Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r2pipe python-async seems much slower than previous sync version #70

Open
JulianSchuette opened this issue Aug 27, 2018 · 0 comments
Open

Comments

@JulianSchuette
Copy link

JulianSchuette commented Aug 27, 2018

Please correct me if this is due to my insufficient python3/asyncio skills, but it seems like the new python-async version is much slower than the previous synchronized one.

A quick test (values are means of some iterations, the r2 specific cmd doesn't matter):

$ python3 --version
Python 3.5.3

Synchronous version (version 2.4.0 commit 007f1d6):

start = time.perf_counter()
res = r2.cmd("pxq 8 @0x%0.16x" % location)
print (time.perf_counter() - start)

7.534199903602712e-05

Asynchronous version (version 2.8.0, commit 6f60dee):

start = time.perf_counter()
res = r2.cmd("pxq 8 @0x%0.16x" % location).result()
print (time.perf_counter() - start)

0.023162505000072997

That's a performance detoriation by roughly factor 300 per r2 command. As I see it there is currently no way to fall back to the synchronous version in 2.8.0 (apart from messing with the python version). Would it be possible to bring back the synchronous version for python3 (or enlighten me what I am doing wrong here)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant