Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Stanislav Zudin <szudin@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v2] core: Non-blocking io.popen
Date: Fri, 31 May 2019 20:32:44 +0300	[thread overview]
Message-ID: <20190531173244.GG31572@atlas> (raw)
In-Reply-To: <20190531114943.2zurdo3m6rct3hzk@esperanza>

* Vladimir Davydov <vdavydov.dev@gmail.com> [19/05/31 16:01]:
> > +static struct popen_data *
> > +popen_lookup_data_by_pid(pid_t pid)
> > +{
> > +	struct popen_data *cur = popen_data_list;
> > +	for(; cur; cur = cur->next) {
> > +		if (cur->pid == pid)
> > +			return cur;
> > +	}
> 
> Please write a comment explaining why you think linear search is fine
> here and why we don't use some kind of hash or tree.

If it is a list of all popen processes, please avoid.
We can't afford adding a yet another, even unlikely, reason for a
100% hog. This makes support difficult - keeping them all one's
head and checking neither is triggered.

-- 
Konstantin Osipov, Moscow, Russia

  reply	other threads:[~2019-05-31 17:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  7:08 Stanislav Zudin
2019-05-30 18:34 ` Vladimir Davydov
2019-05-31  8:13   ` [tarantool-patches] " Konstantin Osipov
2019-06-03 15:52   ` Stanislav Zudin
2019-06-03 17:25     ` Alexander Turenko
2019-06-04  7:11       ` Stanislav Zudin
2019-06-04  7:59         ` Vladimir Davydov
2019-06-05  3:49           ` Alexander Turenko
2019-06-04 11:14     ` Vladimir Davydov
2019-06-04 22:39       ` Alexander Turenko
2019-05-31 11:49 ` Vladimir Davydov
2019-05-31 17:32   ` Konstantin Osipov [this message]
2019-05-31 17:49     ` [tarantool-patches] " Vladimir Davydov
2019-06-03 15:53     ` Stanislav Zudin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190531173244.GG31572@atlas \
    --to=kostja@tarantool.org \
    --cc=szudin@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v2] core: Non-blocking io.popen' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox