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 '' real 0m1.719s user 0m0.088s sys 0m0.036s $ time ./python -c 'import webbrowser' real 0m5.713s user 0m0.308s sys 0m0.196s Hot start: $ time ./python -c '' real 0m0.094s user 0m0.072s sys 0m0.020s $ time ./python -c 'import webbrowser' real 0m1.026s user 0m0.284s sys 0m0.100s ---------- components: Library (Lib) messages: 288551 nosy: serhiy.storchaka priority: normal severity: normal status: open title: webbrowser module import has heavy side effects type: performance versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29645> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com