From: Nikita Pettik <korablev@tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 2/4] box: add binary search for _session_settings space Date: Tue, 17 Mar 2020 17:24:50 +0000 [thread overview] Message-ID: <20200317172450.GA3717@tarantool.org> (raw) In-Reply-To: <35c443bb-9416-d7a2-0eb2-99c299dd5abb@tarantool.org> On 16 Mar 23:53, Vladislav Shpilevoy wrote: > Hi! Thanks for your comments! > > On 16/03/2020 15:16, Nikita Pettik wrote: > > On 17 Feb 15:12, Chris Sosnin wrote: > >> As it is mentioned in implementation, it is important > >> that _session_settings options are sorted by name, so > >> there is no need in linear lookup and we can replace it > >> with binary search. > > > > Is there any sufficient performance benefit except for code complication?:) > > I really doubt that this part should be optimized for such rare in > > terms of usage place. > > We didn't measure perf increase, but for such a simple change it > did not seem necessary. I mean there can be no even performance benefit at all since binary search on small data sets can be slower than sequential access (there's linear search mode even in bps tree, but it is compile time option). > Talking of rareness of settings change - this is arguable. Firstly, > every new session will change settings, if a user's project uses some > of them permanently. Secondly, some settings, such as default engine, > or constraints related, or similar can be changed on per-request basis, > in case user wants to make some requests not checking FK, and others > should check them, inside one session, for instance. Similar necessity > can arise for other settings. I think we can actually measure how faster > lookup became for that case. > > > What is more, there's only dozen entries, so > > binary search doesn't really make any sence. Idk why Kirill assigned 2.4.1 > > It is only dozen for now. This will change. We already have read-only > session coming. > > > milestone, IMHO there are way far more important things to elaborate on. > > Honestly, I was thinking there is not much to elaborate. This is > trivial bsearch. I mean work on more improtant features or/and severe bugs. Nevermind, it is already done anyway. Personally I would reject this patch if there's no any performance increase (otherwise, it simply complicates code).
next prev parent reply other threads:[~2020-03-17 17:24 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-17 12:12 [Tarantool-patches] [PATCH 0/4] box: session settings fixes Chris Sosnin 2020-02-17 12:12 ` [Tarantool-patches] [PATCH 1/4] box: replace session_settings modules with a single array Chris Sosnin 2020-02-17 12:12 ` [Tarantool-patches] [PATCH 2/4] box: add binary search for _session_settings space Chris Sosnin 2020-03-16 14:16 ` Nikita Pettik 2020-03-16 22:53 ` Vladislav Shpilevoy 2020-03-17 17:24 ` Nikita Pettik [this message] 2020-02-17 12:12 ` [Tarantool-patches] [PATCH 3/4] box: provide a user friendly frontend for accessing session settings Chris Sosnin 2020-03-16 16:08 ` Nikita Pettik 2020-03-16 22:53 ` Vladislav Shpilevoy 2020-03-17 14:27 ` Nikita Pettik 2020-03-17 14:36 ` Chris Sosnin 2020-02-17 12:12 ` [Tarantool-patches] [PATCH 4/4] sql: " Chris Sosnin 2020-03-16 17:02 ` Nikita Pettik 2020-03-16 22:53 ` Vladislav Shpilevoy 2020-03-17 17:26 ` Chris Sosnin 2020-03-17 20:12 ` Nikita Pettik 2020-03-17 21:00 ` Chris Sosnin 2020-03-18 10:00 ` Chris Sosnin -- strict thread matches above, loose matches on Subject: below -- 2020-03-30 9:13 [Tarantool-patches] [PATCH 0/4] session settings fixes Chris Sosnin 2020-03-30 9:13 ` [Tarantool-patches] [PATCH 2/4] box: add binary search for _session_settings space Chris Sosnin 2020-04-03 14:00 ` Nikita Pettik 2020-04-13 13:40 ` Kirill Yukhin 2020-02-03 22:17 [Tarantool-patches] [PATCH v4 2/3] " Vladislav Shpilevoy 2020-02-04 19:30 ` [Tarantool-patches] [PATCH 2/4] " Chris Sosnin 2020-02-06 22:15 ` Vladislav Shpilevoy
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=20200317172450.GA3717@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2/4] box: add binary search for _session_settings space' \ /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