diff options
author | kotfu <kotfu@kotfu.net> | 2018-05-06 14:19:09 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-05-06 14:19:09 -0600 |
commit | 53164e866b0071871128260bef726e88fcf1b7a7 (patch) | |
tree | 0f5f24c89537c81cedc457e1fdb3004fa69506c9 /speedup_import.md | |
parent | a479fa94516a9a93b8b58fd8c29479a40f6719d2 (diff) | |
download | cmd2-git-53164e866b0071871128260bef726e88fcf1b7a7.tar.gz |
Add measurement for last five imports
Diffstat (limited to 'speedup_import.md')
-rw-r--r-- | speedup_import.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/speedup_import.md b/speedup_import.md index 02e8cda3..ab143002 100644 --- a/speedup_import.md +++ b/speedup_import.md @@ -56,3 +56,11 @@ $ ./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2" 100 iterations average: real 0.131 user 0.090 sys 0.030 ``` + +## Defer atexit, codes, signal, tempfile, copy + +In commit a479fa94 we defer 5 imports: atexit, codecs, signal, tempfile, and copy. +``` +$ ./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2"100 iterations +average: real 0.120 user 0.081 sys 0.021 +``` |