New submission from INADA Naoki: I used my local patch to profile import time. I think it's useful for 3rd party authors. For example:
./python -Ximportprofile -c 'import traceback' - _codecs 71 [us] - codecs 677 [us] - encodings.aliases 412 [us] - encodings 1688 [us] - encodings.utf_8 250 [us] - _signal 120 [us] - encodings.latin_1 281 [us] - _weakrefset 301 [us] - abc 593 [us] - io 1032 [us] - _locale 100 [us] - _bootlocale 262 [us] - errno 165 [us] - _stat 73 [us] - stat 270 [us] - genericpath 166 [us] - posixpath 456 [us] - _collections_abc 1798 [us] - os 3366 [us] - _sitebuiltins 221 [us] - sitecustomize 408 [us] - usercustomize 168 [us] - site 5019 [us] - _operator 104 [us] - operator 873 [us] - keyword 177 [us] - _heapq 188 [us] - heapq 399 [us] - itertools 140 [us] - reprlib 224 [us] - _collections 89 [us] - collections 3009 [us] - _functools 76 [us] - collections.abc 267 [us] - types 592 [us] - weakref 499 [us] - functools 1726 [us] - enum 894 [us] - _sre 97 [us] - sre_constants 428 [us] - sre_parse 849 [us] - sre_compile 1267 [us] - copyreg 200 [us] - re 3035 [us] - token 222 [us] - tokenize 4660 [us] - linecache 6592 [us] - traceback 10108 [us] ---------- components: Interpreter Core messages: 301858 nosy: inada.naoki priority: normal severity: normal status: open title: Add -X option to show import time type: enhancement versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31415> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com