This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients methane, ncoghlan, rhettinger, xiang.zhang
Date 2016-11-08.07:16:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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, 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.
Date User Action Args
2016-11-08 07:16:41methanesetrecipients: + methane, rhettinger, ncoghlan, xiang.zhang
2016-11-08 07:16:41methanesetmessageid: <>
2016-11-08 07:16:41methanelinkissue28638 messages
2016-11-08 07:16:40methanecreate