mirror of https://github.com/pwndbg/pwndbg.git
Optimize pwndbg.exception import time (#1983)
* Optimize pwndbg.exception import time Before: ``` root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 557 | 127848 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 570 | 126656 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 506 | 120334 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 535 | 119497 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 504 | 119035 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 579 | 119783 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 499 | 123869 | pwndbg.exception ``` After: ``` root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 1697 | 94657 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 430 | 83743 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 433 | 88847 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 474 | 93674 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 372 | 83209 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 529 | 83643 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 374 | 85408 | pwndbg.exception root@pwndbg:~/pwndbg# PYTHONPROFILEIMPORTTIME=1 gdb --batch 2>&1 | grep 'pwndbg\.exception' import time: 374 | 83411 | pwndbg.exception ``` * lazy import pkg_resourcespull/1984/head
parent
c4b71af356
commit
b549286626
Loading…
Reference in new issue