jamesladd / stc

stc
Other
3 stars 2 forks source link

Cache Smalltalk Sources... #6

Closed jamesladd closed 6 years ago

jamesladd commented 6 years ago

Branch: jcl/cache-sources

When finding a Smalltalk source file we look along the classpath and inside JAR's. To remove the need to do this on every request for a Smalltalk source file we need to introduce a source cache.

When we search a classpath or inside JAR's based on the package of the requested Smalltalk source we cache the result. This will be especially useful when we "import packages" like 'st.redline.kernel'.

We only cache those sources found in the requested package so as not to load the every single source file. We are assuming loading those in the same package is appropriate as it is likely they will be used by the requested class who's package we are loading.