Author inada.naoki
Recipients inada.naoki, ncoghlan, rhettinger, xiang.zhang
Date 2016-11-08.07:16:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478589401.03.0.640198550007.issue28638@psf.upfronthosting.co.za>
In-reply-to
Content
> The lazy import system could benefit many libs so the result could be impressive. But here only functools is enhanced, half a millisecond is reduced.

On the other hand, implementing lazy import makes application complex.

This patch only enhance functools, but it is very important one module.
Even if we remove functools from site.py, most applications relies on it,
especially for functools.wraps().
This patch can optimize startup time of them.

Half milliseconds is small, but it isn't negligible on some situation.
Some people loves tools quickly starts.  For example, there are many
people maintain their vimrc to keep <50~100ms startup time.
And Python is common language to implement vim plugins.

Additionally, it make noise when profiling startup time.
I've very confused when I saw PyParse_AddToken() in profile.
Less noise make it easy to optimize startup time.


> Performance of course is important, but replicating code sounds not good. It means you have to maintain two pieces.

Yes. Balance is important.
I want to hear more opinions from more other devs.
History
Date User Action Args
2016-11-08 07:16:41inada.naokisetrecipients: + inada.naoki, rhettinger, ncoghlan, xiang.zhang
2016-11-08 07:16:41inada.naokisetmessageid: <1478589401.03.0.640198550007.issue28638@psf.upfronthosting.co.za>
2016-11-08 07:16:41inada.naokilinkissue28638 messages
2016-11-08 07:16:40inada.naokicreate