A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-December/030683.html below:

[Python-Dev] New and Improved Import Hooks

[Python-Dev] New and Improved Import HooksMoore, Paul Paul.Moore@atosorigin.com
Tue, 3 Dec 2002 16:48:14 -0000
From: Just van Rossum [mailto:just@letterror.com]
> > I've explained this a couple of times now. Please read
> > the PEP for details, but Jim claims that zipfile imports
> > need this if they are not to be too slow.

> Well, I am not going to need it: upon reading the zip
> contents table I build a dict, mapping (full) module
> names to toc info. One dict lookup will be enough to
> get at the right data.

But that's exactly what Jim's cache is doing. His code is
general, and offers the service to *all* import methods,
rather than restricting it to only zipfiles. His benchmarks
showed that this was a (small) win.

Perhaps you could refactor your implementation so that the
cache isn't just for zipfiles? (I can easily imagine other
extensions that would benefit - tarfiles, metakit databases,
imports over the web, ...)

Paul.



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