Date: Mon, 11 Feb 2019 19:56:41 +0100 From: =?UTF-8?B?SmFyb23DrXIgRG9sZcSNZWs=?= <jaromir.dole...@gmail.com> Message-ID: <CAMnsW54tmHhcTbfxwv64e=c=5h-e3iuobro4kr2p5nkrxmb...@mail.gmail.com>
| IMO 2% speedup is not worth this. Entirely reasonable - I'm not sure it is worth it either. | What exactly does take libedit do to take it so long? Does it trigger | loading locales? No, libedit does nothing, it isn't called at all in a non-interactive shell (it just sits there). When I was first testing the new code, I did the infrastructure first (the stuff to call via the functiion pointers, etc) to make sure that no remaining undefined refs to libedit exist, before I added the dlopen() and the dlsym() loop ... which of course made the shell dump core as soon as it attempted to execute one of those un-init'd pointers. An interactive sh couldn't start at all. But non-interactive ones worked just fine. The extra time is all in ld.so simply finding, and doing whatever it does with the library so that the functions it defines can be called. Nothing that could be done to libedit itself can possibly change anything that is being measured here. kre