Closed Hans-JakobHoltzTT closed 3 years ago
I will look into it
This is likely due to construction of __public_fields__
added to Packet.__init__
. I will refactor this and submit a patch
PR https://github.com/kbandla/dpkt/pull/612 timing before the fix:
26.6 µs ± 1.82 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
after the fix:
17.4 µs ± 511 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
Thank you very much for the fix! Performance in this case is back to the v1.9.6 baseline again.
I am a colleague of @Hans-JakobHoltzTT. You can close this issue.
@DerFetzer Thanks for confirming! We'll keep the issue open for visibility until we push a bugfix release (soon).
@obormot let me know when you're ready and I'll push a new version to PyPI
@brifordwylie Latest master is ready to go.. it's just 1.9.7 + bugfix on top. Not sure what to do with the version though. Update existing 1.9.7 in github and push 1.9.7.2 to PyPI?
@obormot 1.9.7.2 pushed to PyPI (https://github.com/kbandla/dpkt/pull/614)
@brifordwylie 🤗
Deserializing an Ethernet frame carrying IPv4 and UDP takes considerably longer with 1.9.7, compared to 1.9.6:
On my machine (i7-8750H, Windows 10, Python 3.7.4 64bit), 1.9.6 can do it in about 13 seconds whereas 1.9.7 takes about 19 seconds, i.e. more than 40% longer.