vstinner/python-ptrace

the performance of -f option

Opened this issue · 1 comments

hi,
i want to know the program execution process ,when i use the -f option, the process will be very slowly。
for example, i excute command "apt-get install gedit" , it takes about 5 seconds. if i use " python2.7 ./strace.py -f apt-get install gedit",it takes 2.5 min, the time is unacceptable.
i alse use linux strace, excute cmd "strace -f apt-get install gedit", it taks 20 second.
do you know the reason of being slowly?

python-ptrace is implemented in Python, it's slower than strace which is written in C.

python-ptrace was never optimized, maybe there are some obvious non-efficient code. There is also a cptrace module which avoids the slow ctypes.