typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

Cache FS in LS

Open jakebailey opened this issue 6 months ago • 4 comments

I think this is right; within a Project, cache the FS accesses and clear them out on graph update for safety. Then, things get faster in load time in module resolution and so on.

Not a mega fan of the whole host wrapping but I don't see a better way.

jakebailey avatar May 30 '25 18:05 jakebailey

We did this in Strada too (though we did it before creating program in service) this is known to help perf.

sheetalkamat avatar May 30 '25 19:05 sheetalkamat

Unfortunately this method doesn't really work, the project test system replaces the FS out from under the cache, but the cache FS grabs the FS on creation.

I've been able to change the tests to not do that, but I'm not clearing the cache in places that seemingly we need it. So this will need more work.

jakebailey avatar May 30 '25 21:05 jakebailey

Oh oops, sorry, this was supposed to be a draft when I sent it 😄

jakebailey avatar May 30 '25 21:05 jakebailey

CI fails because the new ATA code runs before updateGraph and therefore reads from the cached FS before it's cleared.

jakebailey avatar May 31 '25 00:05 jakebailey

Another ATA test race 😦

jakebailey avatar Jun 03 '25 22:06 jakebailey