Closed kirillgla closed 4 years ago
Right, in projects with hundreds of thousands of T4 files my implementation might create significant memory traffic on every typing in T4 file. For small real-world projects though, memory profiling did not reveal any noticeable issues. I know it is possible to avoid allocating that memory by manually maintaining a dictionary from files to files including them and manually invalidating it, but that does not seem to me to be worth the effort
Prior to this, there was a weird construction by @MrJul which manually tracked file changes and stored them in a cache-like structure. It didn't work very well in some edge cases; particularly so - during startup. This PR is dedicated to rewriting that structure based on
SimpleICache
. The main goals of keeping the graph are:The first part is exposed as
FindRoot
method; the second one is handled directly in theMerge
method