Skip to content

Commit bbce3fc

Browse files
committed
Updated measurements
1 parent fc495a4 commit bbce3fc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

speedup_import.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ average: real 0.115 user 0.080 sys 0.020
7979
In commit ccfdf0f9 we extract AddSubmenu() to it's own file, so it is not
8080
imported or processed by default.
8181
```
82-
./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2"
82+
$ ./mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2"
8383
100 iterations
8484
average: real 0.117 user 0.081 sys 0.021
8585
```
@@ -89,3 +89,11 @@ average: real 0.117 user 0.081 sys 0.021
8989
Python takes ~30ms to start up and do nothing. When we began we estimated it took
9090
~110ms to import cmd2. We are now down to about ~90ms, which is approximately a
9191
20% improvement.
92+
93+
## Move more functions into utils
94+
95+
Commit fc495a42 moves a few functions from `cmd2.py` into `utils.py`.
96+
```
97+
$ ~/bin/mtime.sh ~/.pyenv/versions/cmd2-3.6/bin/python -c "import cmd2"
98+
100 iterations
99+
average: real 0.119 user 0.081 sys 0.021

0 commit comments

Comments
 (0)