[issue14067] Avoid more stat() calls in importlib

2021-10-23 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Related : https://bugs.python.org/issue14067 -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue14067] Avoid more stat() calls in importlib

2021-10-23 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I wonder if the circumstances changed since this is an old issue? the method looks to have a deprecation warning and changed a bit too, I stand to be corrected. -- nosy: +nanjekyejoannah ___ Python tracker

[issue14067] Avoid more stat() calls in importlib

2020-01-28 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue14067] Avoid more stat() calls in importlib

2013-10-19 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14067] Avoid more stat() calls in importlib

2012-02-27 Thread Brett Cannon
Brett Cannon added the comment: Well, we already have a delay in detecting new files in importlib as the directory mtime check already adds a delay of the granularity of the mtime value for a directory. So if you manage to mutate a directory, import, write a file, and then import again all wi

[issue14067] Avoid more stat() calls in importlib

2012-02-26 Thread Jim Jewett
Jim Jewett added the comment: As long as the interpreter knows about about files that *it* wrote, no repeat checks during startup seems utterly reasonable; sneaking in a new or changed file is inherently a race condition. I think it would also be reasonable for general use, so long as there w

[issue14067] Avoid more stat() calls in importlib

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > While I don't think the delay in noticing filesystem changes is > reasonable as the default behaviour, it might be interesting to see how > tricky it would be to create a custom importer (for either meta_path or > path_hooks) that did this. Mmmh. Then I thi

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Nick Coghlan
Nick Coghlan added the comment: FWIW, I doubt you'd get many objections if you ended up wanting to make time a builtin module and inject it into the bootstrapping namespace. While I don't think the delay in noticing filesystem changes is reasonable as the default behaviour, it might be intere

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Brett Cannon
Brett Cannon added the comment: On Mon, Feb 20, 2012 at 18:06, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > The patch uses the time module which is not a built-in, so it breaks > > bootstrapping by directly importing a module, and an extension at > > that. At best you coul

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The patch uses the time module which is not a built-in, so it breaks > bootstrapping by directly importing a module, and an extension at > that. At best you could switch to a modified _FileFinder after > importlib is initially running and able to import extens

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Brett Cannon
Brett Cannon added the comment: The patch uses the time module which is not a built-in, so it breaks bootstrapping by directly importing a module, and an extension at that. At best you could switch to a modified _FileFinder after importlib is initially running and able to import extension mod

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file24583/imptime.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file24584/imptime.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue14067] Avoid more stat() calls in importlib

2012-02-20 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is an experimental patch that limits the frequency of stat() calls in _FileFinder.find_module(). It speeds up finding modules by 2x here, but unfortunately breaks some tests (which expect modules to appear immediately when created). -- compone