On Fri, 2 Jun 2000, Moshe Zadka wrote: > Trusting OS-based mtimes for .pyc caching has some inherent problems. > (Clock syncing and similar) Frankly, though I've never been bitten by > this, it does give me an uncomfortable feeling. What if, instead, we'd use > md5- or sha-based approach? That is an expensive computation. You'd have to read the whole file in and compute the hash. Today, we simply stat() each file. If the .pyc looks valid, we open it and check the date stamp against one of those stat's. You would be adding an open(), a read of the full file, and compute a hash -- to every import of a .pyc. -1 Cheers, -g -- Greg Stein, http://www.lyra.org/
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