On 2/8/2010 7:54 AM, Nick Coghlan wrote: > Ron Adam wrote: >> To tell the truth in most cases I hardly notice the extra time the first >> run takes compared to later runs with the precompiled byte code. Yes it >> may be a few seconds at start up, but after that it's usually not a big >> part of the execution time. Hmmm, I wonder if there's a threshold in >> file size where it really doesn't make a significant difference? > > It's relative to runtime for the application itself (long-running > applications aren't going to notice as much of a percentage effect on > runtime) as well as to how many Python files are actually imported at > startup (only importing a limited number of modules, importing primarily > extension modules or effective use of a lazy module loading mechanism > will all drastically reduce the proportional impact of precompiled bytecode) > > We struggle enough with startup time that doing anything that makes it > slower is rather undesirable though. Definitely. I have even wondered whether it would be possible to cache not just the bytecode for initializing a module, but also the initialized module itself (perhaps minus the name bindings for other imported modules). Terry Jan Reedy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4