mirror of https://github.com/sbt/sbt.git
I am going to add a classloader cache to improve the startup performance of the run and test tasks. To prevent the classloader cache from having unbounded size, I'm adding a simple LRUCache implementation to sbt. An important characteristic of the implementation of the cache is that when entries are evicted, we run a callback to cleanup the entry. This allows us to automatically cleanup any resources created by the entry. This is a pretty naive implementation that uses an array of entries that it manipulates as elements are removed/accessed. In general, I expect these caches to be quite small <= 4 elements, so the storage overhead / performance of the simple implementation should be quite good. If performance ever becomes an issue, we can specialzed LRUCache.apply to use a different implementation for caches with large limits. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||