[issue29645] webbrowser module import has heavy side effects

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a7cba27aea13837e2ab1d91584efcfeac4ec by Serhiy Storchaka in branch 'master': bpo-29645: Speed up importing the webbrowser module. (#484) https://github.com/python/cpython/commit/a7cba27aea13837e2ab1d91584efcfeac4ec --

[issue29645] webbrowser module import has heavy side effects

2017-03-17 Thread Larry Hastings
Changes by Larry Hastings : -- pull_requests: +626 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue29645] webbrowser module import has heavy side effects

2017-03-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue29645] webbrowser module import has heavy side effects

2017-03-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +397 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue29645] webbrowser module import has heavy side effects

2017-03-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: This will help IDLE startup (though webbrowser should not be imported on windows, where os.startfile is used instead). This is a somewhat separate issue, but should the Windows code be modified for Win10 and Microsoft Edge? -- nosy: +terry.reedy

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The new GitHub PR workflow still looks cumbersome and unclear to me. It needs using a lot of git commands different for different branches (and some command are failed or don't work as I expected when I try to repeat sequences from the devguide). How to conv

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: Patch LGTM. Serhiy, did you want to take this as a chance to run through the new GitHub PR workflow? Current details are at https://docs.python.org/devguide/pullrequest.html -- ___ Python tracker

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added tests. -- Added file: http://bugs.python.org/file46670/webbrowser-delayed-initialization-2.patch ___ Python tracker ___ ___

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Nick Coghlan
Nick Coghlan added the comment: Nice, this is much cleaner than the current approach! The one thing I would suggest is a new test case that: - asserts webbrowser._tryorder is None - asserts webbrowser._browsers is empty - calls webbrowser.get() - asserts webbrowser._tryorder is non-empty - asse

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What is the different of Cold start and Hot start? Disk caches are dropped before cold start. $ echo 3 | sudo tee /proc/sys/vm/drop_caches -- ___ Python tracker _

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file46667/webbrowser-delayed-initialization.patch ___ Python tracker ___ ___

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch makes searching of all platform browsers delayed until it is needed. In addition it makes webbrowser.register() thread safe. Cold start: $ time ./python -c 'import webbrowser' real0m2.851s user0m0.224s sys 0m0.056s Hot start: $

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Louie Lu
Louie Lu added the comment: What is the different of Cold start and Hot start? It that CPU speed or something else. In Linux 4.9.11 with i7-2k, I can't reproduce the significant real time you gave: # CPU gov powersave $ time ./python -c 'import webbrowser' 0.16s user 0.02s system 93% cpu 0.20

[issue29645] webbrowser module import has heavy side effects

2017-02-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: `import webbrowser` has heavy side effects. It searches a number of executables. On X Window it also runs external program xdg-settings. Cold start: $ time ./python -c '' real0m1.719s user0m0.088s sys 0m0.036s $ time ./python -c 'import webbr