I tested this by loading the Garrison.age from MOULa. In the beginning, loading Garrison took approximately 34 seconds. After these changes, the time is down to approximately 6.5 seconds to load the Age. The major improvement comes from bypassing many calls to ftell(), which tank the performance on Windows. The downside is that this makes pfSizedStream a bit less flexible in that it assumes that it owns the underlying base stream and no one else will touch it while it lives.
I tested this by loading the Garrison.age from MOULa. In the beginning, loading Garrison took approximately 34 seconds. After these changes, the time is down to approximately 6.5 seconds to load the Age. The major improvement comes from bypassing many calls to
ftell()
, which tank the performance on Windows. The downside is that this makespfSizedStream
a bit less flexible in that it assumes that it owns the underlying base stream and no one else will touch it while it lives.Benchmark tool I used can be found here.