H-uru / libhsplasma

Cross-platform Plasma data and network library
GNU General Public License v3.0
32 stars 30 forks source link

Improve PRP read performance. #212

Closed Hoikas closed 3 years ago

Hoikas commented 3 years ago

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.

Benchmark tool I used can be found here.