• Peter Wu's avatar
    Follow Stream: ensure linear performance with many packets · e56148c4
    Peter Wu authored
    Reverse the payload chunks list to achieve a running time of O(n) rather
    than O(n²) for insertion of all chunks. Executing a RelWithDebInfo+ASAN
    build with `tshark -r chargen-session.pcapng.gz -qz follow,tcp,hex,0`
    previously took 11m5s to complete, but now finishes in 16 seconds.
    Tested using a capture file with 152k TCP packets (from bug 11777).
    Backport note: must update ui/gtk/follow_stream.c too.
    Change-Id: Icf70d45f33d4399e53209fb6199d3809608c8d99
    Reviewed-on: https://code.wireshark.org/review/28595
    Petri-Dish: Peter Wu <peter@lekensteyn.nl>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: 's avatarAnders Broman <a.broman58@gmail.com>
    (cherry picked from commit c40c26c04c6a39ef7867a35c50293c666255c9a4)
     [Peter: updated ui/gtk/follow_stream.c for master-2.6]
    Reviewed-on: https://code.wireshark.org/review/28642
sharkd_session.c 102 KB