Skip to content

Commit

Permalink
Make the ACS string pool reserve more strings
Browse files Browse the repository at this point in the history
Due to only reserving a single new string when growing the string pool, any ACS code that generates lots of strings will eventually cause massive amounts of lag, to the point where ACSStringPool takes up *most of the execution time*. The proposed change fixes this issue.
  • Loading branch information
marrub-- authored and coelckers committed Feb 10, 2018
1 parent 5dd9866 commit 66d15dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/p_acs.cpp
Expand Up @@ -1284,7 +1284,7 @@ int ACSStringPool::InsertString(FString &str, unsigned int h, unsigned int bucke
}
if (index == Pool.Size())
{ // There were no free entries; make a new one.
Pool.Reserve(1);
Pool.Reserve(MIN_GC_SIZE);
FirstFreeEntry++;
}
else
Expand Down

0 comments on commit 66d15dc

Please sign in to comment.