hegemonic / catharsis

A JavaScript parser for Google Closure Compiler and JSDoc type expressions.
MIT License
54 stars 14 forks source link

Use an LRU cache #33

Open hegemonic opened 10 years ago

hegemonic commented 10 years ago

For efficiency, Catharsis caches all of its parse results. Right now it caches all parse results indefinitely, which is not appropriate for a long-running process. Catharsis should use an LRU cache instead.

hegemonic commented 9 years ago

I've never verified that caching the parse results is actually faster than re-parsing the type expression. So before I add an LRU cache, I need to run some quick benchmarks of the following: