Closed KaelaSavia closed 7 months ago
Do you have any benchmark data for this?
PR replaces fscanf with getline which is faster than fscanf.
Elapsed CPU Time (FSCANF) = '7.91713' sec. Elapsed CPU Time per Iteration (FSCANF, 500000) = '1.583425e-05' sec. Elapsed CPU Time (GETLINE) = '4.13407' sec. Elapsed CPU Time per Iteration (GETLINE, 500000) = '8.268138e-06' sec.
As per in-game performance, on stress test map with a lot of sdkhooked entities. Time goes from 1975 ms to 903 ms. (https://github.com/alliedmodders/sourcemod/issues/1935)
Credits to original pull https://github.com/alliedmodders/metamod-source/pull/127 @PeakKS
Introduces faster parsing to ModuleInMemory.