diff options
author | kotfu <kotfu@kotfu.net> | 2018-05-06 17:57:21 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-05-06 17:57:21 -0600 |
commit | bbce3fcec6f1b4f8f0f23bffbe30a4887c417d3e (patch) | |
tree | 82619eca2f2e7cf6434717b867bd24a8d47983ba | |
parent | fc495a4201cee744807bee058115824287cd6b33 (diff) | |
download | cmd2-git-bbce3fcec6f1b4f8f0f23bffbe30a4887c417d3e.tar.gz |
Updated measurements
-rw-r--r-- | speedup_import.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/speedup_import.md b/speedup_import.md index 91104677..c49f1e86 100644 --- a/speedup_import.md +++ b/speedup_import.md @@ -79,7 +79,7 @@ average: real 0.115 user 0.080 sys 0.020 In commit ccfdf0f9 we extract AddSubmenu() to it's own file, so it is not imported or processed by default. ``` -./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2" +$ ./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2" 100 iterations average: real 0.117 user 0.081 sys 0.021 ``` @@ -89,3 +89,11 @@ average: real 0.117 user 0.081 sys 0.021 Python takes ~30ms to start up and do nothing. When we began we estimated it took ~110ms to import cmd2. We are now down to about ~90ms, which is approximately a 20% improvement. + +## Move more functions into utils + +Commit fc495a42 moves a few functions from `cmd2.py` into `utils.py`. +``` +$ ~/bin/mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2" +100 iterations +average: real 0.119 user 0.081 sys 0.021 |