You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#701 removed caching and I find performance of using ts-node unbelievably slow in any version beyond v7.0.1. The commit which removes caching behavior is in response to #672 (Cache doesn't take modified dependencies into account). I use ts-node in combination with TS_NODE_FILES=true and have never hit this problem nor was I able to reproduce the issue.
It seems that the maintainer is willing to accept a PR to add caching behavior in #920. Before I submit a PR, I'd like to confirm if it will be acceptable to restore the previous behavior, but have caching disabled by default and update the README to state that this is discouraged and link th #672 as to the reason why?
Reacted by Daniel M., Aaron Wentzel, Artur Khusainov, Mitch Talmadge, Juhan Oskar Hennoste and Jakub Jirutka
Discussion about how to re-add caching is over here: #908
That thread has my thoughts on how to implement disk caching. For my use-cases, I'm focused on using it with transpile-only mode, since my projects perform typechecking as a separate step. It should be safe to enable automatically with transpile-only when we're not using transformers. For your case it would still need to be behind an opt-in flag, as you say. Even then, maintainers might be against it if it causes an influx of false bug reports. But I can't speak for anyone else.
Activity
cspotcode commentedon Feb 3, 2020
@andrewmackrodt
Discussion about how to re-add caching is over here: #908
That thread has my thoughts on how to implement disk caching. For my use-cases, I'm focused on using it with transpile-only mode, since my projects perform typechecking as a separate step. It should be safe to enable automatically with transpile-only when we're not using transformers. For your case it would still need to be behind an opt-in flag, as you say. Even then, maintainers might be against it if it causes an influx of false bug reports. But I can't speak for anyone else.
blakeembrey commentedon Feb 4, 2020
SGTM behind a flag 👍
ecraig12345 commentedon Apr 22, 2020
Do you know when you'll be able to get to this? My team would like to use ts-node but the performance without caching is a huge blocker.
cspotcode commentedon Apr 22, 2020
@ecraig12345 not sure, pull requests are welcome. In the meantime you can use typescript-cached-transpile, linked over here: #908
Turning on
--transpile-onlymode should make a big difference, too, maybe enough that you don't need caching.cspotcode commentedon Jul 22, 2022
Closing since I doubt we'll get a PR for this, and
ts-node --swcgives as much speed as you'd get with caching, but without the complexity of caching.If any sort of caching does get implemented, it'll probably be related to TS's incremental builds.