-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-added the string cache, disabled by default (bonus: also thread-safe) #172
base: master
Are you sure you want to change the base?
Commits on Aug 4, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 95233e9 - Browse repository at this point
Copy the full SHA 95233e9View commit details
Commits on Apr 1, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 643d79f - Browse repository at this point
Copy the full SHA 643d79fView commit details
Commits on Apr 22, 2016
-
Re-adding string caching (memory optimization, for memory usage and a…
…lso very importantly memory fragmentation). Added StringCache.pas. Changed attributes to use the string cache. Note required a define USESTRINGCACHE which is off by default. The cache is not threadsafe.
Configuration menu - View commit details
-
Copy full SHA for e6baee2 - Browse repository at this point
Copy the full SHA e6baee2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3228e5b - Browse repository at this point
Copy the full SHA 3228e5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 66d852e - Browse repository at this point
Copy the full SHA 66d852eView commit details -
TStringCacheDictionary is not used (was originally written for a dict…
…ionary of attributes, but attributes no longer work as a dictionary.)
Configuration menu - View commit details
-
Copy full SHA for 1aa71d6 - Browse repository at this point
Copy the full SHA 1aa71d6View commit details -
Basic threadsafety for the string cache. Not extensively reviewed. Wh…
…en threadsafe, any individual instance has get/add method contents wrapped in a lock, to lock the internal structures. The instance is never cleared when the count of objects using it drops to 0, since that's a bit more complex to get right (should only clear while the refcount is 0, but have to lock that to ensure it's not changed while clearing is happening, which severely slows inc/decrementing the count. I couldn't think of a good compare-lock-exchange algorithm. So just don't bother; it's never cleared while alive, when threadsafe.)
Configuration menu - View commit details
-
Copy full SHA for fc0470b - Browse repository at this point
Copy the full SHA fc0470bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b58370 - Browse repository at this point
Copy the full SHA 5b58370View commit details -
Comment; also holds lock for AddAndGet (enters lock individually for …
…both operations; now holds it for both. Safe to enter a CS twice.)
Configuration menu - View commit details
-
Copy full SHA for 6685524 - Browse repository at this point
Copy the full SHA 6685524View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38e35ba - Browse repository at this point
Copy the full SHA 38e35baView commit details
Commits on Apr 23, 2016
-
Configuration menu - View commit details
-
Copy full SHA for b799dd8 - Browse repository at this point
Copy the full SHA b799dd8View commit details