-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issues #31
Comments
There shouldn't be any performance issues, but there is a large start up cost for compiling the project. Also, all the files are currently kept in memory which can be a memory overhead so it's not recommended for production (yet). There's a few things that can improve this - for example, storing transpiled output into files and allowing the code to skip all type checking in production. These have no been implemented. The speed overhead should roughly equate to the time spent in |
Thank you @blakeembrey! I'll experiment a bit more and see what I find. Just to tell you about the performance issues I'm seeing.
|
@domoritz Thanks for the detail! That looks like and insane difference, I'll experiment with it more. There's certainly some optimizations that I should look into, so I'll do that ASAP for you too. |
@blakeembrey Awesome. I really like this plugin btw. I am woking on vega-lite and the switch to ts-node was done in vega/vega-lite@0e66b31. Let me know if you have any questions about it. |
I'm working in rather large coffeescript/typescript codebase that takes ~40 seconds to compile (I'm not sure why it takes so long - that's an important but separate issue.) The implementation of |
@ksikka What version are you using? @ksikka @domoritz I'll do a complete refactor to a different compilation model using TypeScript, but there's trade-offs on all sides. For example, out of band Most likely I'll do a refactor to use both, the initial If I do this, would you guys mind trying it out? |
@ksikka Are you using the type checking of TypeScript at all with |
@blakeembrey I'd definitely try it and report the performance numbers. |
I am experiencing same issue -- using mocha --recursive --require ts-node/register ./src/**/*-spec.ts Eats extra ~20 seconds comparing to regular build which uses Webpack and ts-loader. |
Can you guys try |
The time to run the test went down from 23 to 13 seconds. Great work @blakeembrey. However, with tsc and then running the tests over js, the tests take 7 seconds in total (of which the actual test running time is only 1.82 seconds). |
@blakeembrey I confirm reduction from ~20 sec to ~10 sec in addition to baseline of separate tsc compile + test with |
Hi @blakeembrey, thought I'd leave some stats from a project I have "ts-node": "^0.5.5", typescript files: about 80, ~1.25 MB
starting server ...
ready on 3000
starting server ...
ready on 3000 I have trimmed a fair bit on the console output, just gives you an idea of the different between TSC |
Accepting PRs and any help, I'm not sure I have enough time to do any great optimisations to get much closer than |
I believe most of the performance issues have been optimised. I'm going to close this unless there's something actionable. I think the biggest improvement come from #129, but do let me know if it's not on par. |
@blakeembrey what you have done is epic! upgrading from 0.5.5 to 1.0.0, I got a reduction of ~30s to ~20s now I just let the IDE do the types checks |
Are there known performance issues of ts-node? I have a medium sized typescript project and we used to compile with tsc and then run tests with mocha. However, ts-node seems to be better because we a) don't need to have a plugin to support sourcemaps and b) generate
js
andjs.map
files before we run the tests. So I tried ts-node with mocha in gulp but now builds take ~20s. I suspect that this is because all the files have to be recompiled. Is this a known issue?The text was updated successfully, but these errors were encountered: