Garethp / Rider-RimworldDevelopment

MIT License
9 stars 2 forks source link

Move DefTags into a SimpleICache #7

Closed Garethp closed 1 year ago

Garethp commented 1 year ago

One of the biggest performance issues was the fact that in order to maintain a list of XML Defs and their associated Tags we kept manually kept them in a Singleton and built that by scanning every XML file in the project every time a CompletionContext was built up.

We can signifigantly improve this by creating an implementation of SimpleICache which allows the cache to be built when the files are added or changed, allows the cache to be persisted between sessions and works in the background. I'm sure there's many more things we can do to improve performance down the line, however this is a massive win right now