-
Notifications
You must be signed in to change notification settings - Fork 421
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
Non-Linear response for sequential iteration of large capture #48
Comments
Not sure if you got a chance to look at this but a look through the code and some debugs it looks like the slowdown is in asyncio; more specifically the stream reader below. Are you seeing the same? Thanks new_data = yield From(stream.read(self.DEFAULT_BATCH_SIZE)) |
I've backed down to using older rev of pyShark (0.2.6), prior to asyncio, and see vastly better performance although some other things seem broken like frame_info, display filter on capture and getting certain field matches to work. I was able to process 420K packets in under 8 minutes. Thanks -- Packet Processing Progress Report -- |
Yes, it seems asyncio severely reduced performance (on unix anyway, I'm On Wednesday, December 17, 2014, chrconlo notifications@github.com wrote:
|
I've (probably) isolated the problem to: https://github.com/KimiNewt/pyshark/blob/master/src/pyshark/capture/capture.py#L147 The solution is probably to extract ALL the packets at once from the data received instead of one at-a-time (we can't use lxml for this as it does not support parsing partial XMLs). I'll try finding a solution for that. |
Interesting. Any luck finding a solution for this? Thanks |
Fixed by PR #66 |
Thanks for the great tool!
I'm attempting to use pyshark to iterate large capture files (180K packets per file) and see non-linear response from iteration. Is there a way to tune pyshark to behave linearly in such circumstances? At around 3K packets is starts getting really slow.
bpduTracker chrconlo$ ./bpduTracker.py
Starting bpduTracker...
Capture File Found: /users/xyz/Desktop/20141202/prog/test.cap
2014-12-11 16:05:00.030286 -> Packet Count: 50
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:00.402444 -> Packet Count: 100
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:00.996808 -> Packet Count: 150
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:01.793828 -> Packet Count: 200
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:02.814992 -> Packet Count: 250
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:04.133944 -> Packet Count: 300
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:05.571902 -> Packet Count: 350
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:07.212769 -> Packet Count: 400
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:09.178611 -> Packet Count: 450
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:11.315323 -> Packet Count: 500
BPDU Accounting Dictionary Size: 0
2014-12-11 16:05:13.638662 -> Packet Count: 550
BPDU Accounting Dictionary Size: 0
The text was updated successfully, but these errors were encountered: