Message238724
This would avoid the need to modify an interpreter to have this optimization. In this mode the potentially expensive stat() call is avoided. No need to ensure that the pyc file's embedded timestamp matches the py file's timestamp. The only use of this mode would be when that is guaranteed by a build system so loading modules continues to be fast without reverting to loading the py when the pyc is already known good.
Our specific example is a build system that generates pyc's for some py files at build time but timestamps of files are not maintained at all through the build/packaging/distribution process because they are seen an irrelevant detail and not even kept track of by the build. Python is fairly unique in wanting to depend upon file timestamp metadata as a form of input data going from py -> pyc.
Right now we work around the problem by not having py files available at all in this situation. Using .pycs greatly speeds up the program's load time, but not having source code around makes for worse tracebacks and causes problems with other tools which need to use the source. |
|
Date |
User |
Action |
Args |
2015-03-20 21:22:42 | gregory.p.smith | set | recipients:
+ gregory.p.smith, twouters, brett.cannon, pitrou |
2015-03-20 21:22:42 | gregory.p.smith | set | messageid: <1426886562.28.0.0443194540811.issue23723@psf.upfronthosting.co.za> |
2015-03-20 21:22:42 | gregory.p.smith | link | issue23723 messages |
2015-03-20 21:22:42 | gregory.p.smith | create | |
|