3 ms·
I really wish to find ts tooling that would show me deltas in ts checker memory usage and tie them to diffs in ci
by tarasglek 2y ago
I really wish to find ts tooling that would show me deltas in ts checker memory usage and tie them to diffs in ci
- kevingadd 2y agoWe accidentally had a regression slip into our TS once that made it take over 7 seconds to typecheck a file, and that was surprisingly painful to diagnose. It meant our CI builds were slower, our local builds were slower, and the language server (in VS code, sublime, etc) would just randomly go unresponsive while editing. If there were tooling to track deltas in that per-file we would have noticed it immediately.
- MonstraG 2y agoCan you share what was the problem, just in case we have it too?
- eddd-ddde 2y agoI'd bet it had to do with complex templates. I've had typescript break on me when using libraries like elysia that go full send on their templates.
- kevingadd 2y agoWe had little strings that encoded call signatures, like "iiff" for int int float float. Someone cooked up a way to have typescript validate the strings at build time, but the way it does typechecks against string literals like that seems to cause every string literal in your entire compilation to get validated in advance to figure out whether it could possibly be that specific type. Each possible value - let's say we had 'f', 'i', and 'l' originally and then we added a fourth option for 'd' - caused the typecheck time to magnify by increasing the possible options. IIRC.