Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 5802] Rewrite&cleanup wiretap/file_wrappers

Date: Wed, 6 Apr 2011 11:09:41 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5802

--- Comment #16 from Guy Harris <guy@xxxxxxxxxxxx> 2011-04-06 11:09:40 PDT ---
If by "FILE i/o" you mean fread(), it's *worst* in sequential forward I/O by a
small amount, second-best for random I/O with the new library with a small
buffer doing better by a small amount and with the bigger buffers worsening
random I/O, and by far best for "sequential" reverse I/O.

I'm a little surprised that standard I/O does better than the new code with a
GZBUFSIZE of 4K, as I suspect both of them are doing 4K reads in that case, so
the amount of "wasted" data read in - i.e., data you read in but won't use
because the next packet you read won't overlap with that 4K chunk.

Reading in reverse *might* be a worst-case example of "reading the wrong
stuff", but it *shouldn't* be - in either case, you should read each block of
the file once.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.