-
Notifications
You must be signed in to change notification settings - Fork 8
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
Possible ways to make compilation faster #8
Comments
klesun
added a commit
to klesun-misc/ts-browser-beta
that referenced
this issue
Feb 16, 2020
For some reason it did not become faster at all, possiblyI am doing something wrong
klesun
added a commit
to klesun-misc/ts-browser-beta
that referenced
this issue
Feb 16, 2020
For some reason it did not become faster at all, possiblyI am doing something wrong
Moved transpilation process to workers. Compilation time is now 32% shorter on my machine: 4 CPU cores, 3 workers used. https://klesun-productions.com/entry/midiana/ load time in ms
|
klesun
added a commit
that referenced
this issue
Feb 16, 2020
You do not normally change _all_ files constantly, so the performance boost should be pretty viable
Same page now loads in 791, 854, 771 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reminder: currently each module compilation takes 10-50 ms of CPU time.
Research typescript API/source code, there will probably be some tricks to transpile it faster, like disabling logging. If there will be an API to transpile already parsed
Node
objects separately, that would also improve performance about 2 times: since currentlySourceFile
is created twice per module - once to parse it for imports, and once to transpile modified version of it.Run compilation in separate workers to get use of multiple CPU cores. If machine has 8 CPUs then ideally, compilation should become 8 times faster.b63443bKeep compilation results for unchanged files in browser cache... probably should make it configurable.aba27ddMinify
typescriptServices.js
fileMaybe passing all files to
ts.transpile()
at once would make compilation faster...The text was updated successfully, but these errors were encountered: