Wireshark-bugs: [Wireshark-bugs] [Bug 5802] Rewrite&cleanup wiretap/file_wrappers
Date: Wed, 6 Apr 2011 01:31:16 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5802

--- Comment #14 from Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx> 2011-04-06 01:31:15 PDT ---
(In reply to comment #12)
> As someone indicated there is a performance hit using the gz funktions
> also when reading uncompressed files(?) would it be feasible to check
> if the file is compressed first and then use normal file access if the
> are not?

Hmm, I believe reading in both gzread() & fread() functions are done with
caching.

Currently uncompressed files are read in 16 KiB chunks (GZBUFSIZE * 2), 
[or if request is larger than 16 KiB it's done directly to buffer. But I think
this case is rare in wiretap]

I really don't know if it is good value or no (and good value vary on pagesize,
sectorsize, blocksize, etc..), so I leave cache size the same as it was in
zlib.

It *might* be good idea to disable cache on random file, and/or play a little
with posix_fadvise. But IMHO any patch needs profiling.

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