Wireshark-bugs: [Wireshark-bugs] [Bug 5802] Rewrite&cleanup wiretap/file_wrappers
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5802
--- Comment #19 from Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx> 2011-04-07 04:08:26 PDT ---
I found problem in seeking when we haven't read header, (i.e. when compression
is set to UNKNOWN). Seeking in UNKNOWN file involves skiping (reading+discard)
'offset' bytes, instead of fast lseek().
I added gz_head() call after opening file, but I don't like it.
I think better fix would involve making fast_seek point (like we do for zlib)
after gzip header(s) and initial position of uncompressed file (instead of
seting file->raw), fast_seek points are shared among fh and random_fh so it
should work OK.
New test results when reading file with st_blksize chunks:
Test1: 56 ms (packets 60174 data offset: 81546072)
Test2: 123 ms
Test3: 17 ms
If you have any other tests I can try them.
Honestly I don't see much sense in making it faster, but it should be possible
to use function pointers for filling out buffer instead of multiple if's, and
Windows users might want to rewrite it to WinAPI...
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.