Forum OpenACS Development: util_memoize_flush_regexp does not scale
I tracked it down to multiple calls to util_memoize_flush_regexp in workflow.
That procedure loops over all the util_memoize cache entries, in this case 400,000 of them, and performs several regexp on them.
This is obviously very slow. I don't recommend using this procedure in any busy site.
The 400,000 cache entries only take up 9mb so you can easily get a huge number of cache entries with a relative small total cache size.
The change is easy.. we can try it out and see how it performs in openacs.org
Don suggested using the db_* cache feature which will also greatly simplify the code.
util_memoize_flush_regexp is 1600000 microseconds with 500,000 cache entries and a simple regexp like "XYZ.*"
So ns_cache names is about 20x faster. There isn't anyplace in the toolkit that a regexp is required and simple match would not work.