Closed himselfv closed 11 years ago
*Turning this Issue into generic optimization one.
Wakan.cfg is read in 128 byte chunks. Each read is a kernel call => spends time.
Read it all at once, then process in memory.
Reported by himselfv
on 2013-02-08 13:08:58
When optimizing Packages/TextTables, also optimize PkgWrite which uses the same strange
buffering system
Reported by himselfv
on 2013-02-08 13:16:00
Major time when loading was spent on reading packages, again and again, in small chunks.
Headers are read in 1 byte/337 byte reads, then data in 2000 byte reads.
This was mitigated by using a cached reader with a cache of 1Mb. It's pretty efficient
so now it's only a few reads and a lot less time spent.
This was not really a "fix" because packages are still inefficient, they're just cached
now. If I ever care to make this right, I guess I'll need to rewrite package code to
first read whole header and work on it in memory, then to read contained files in large
chunks (ideally, to read the whole file in one operation, but this might not be possible
if there's no size prefix)
Reported by himselfv
on 2013-02-11 09:00:28
Reported by himselfv
on 2013-02-18 13:20:17
Fixed
Original report by me.
Originally reported on Google Code with ID 111
Reported by
himselfv
on 2013-02-08 13:07:37