-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Compile times inconsistent with module dependents count? #8479
Comments
There is no optimization in place for modules in Adding the optimization is tracked by #3204 |
Thanks - that answers it. |
@mhegazy you mentioned that optimisation of the kind referenced above should be covered in #3204. In a recent update to #3204 you mention 'this' is covered in #9837. Please can you help point out what changes are required in order to optimise As of Thanks |
Sorry for the confusion. we have two features that do more or less the same thing in different contexts, the proposal in #3204 was for a specific use case, the implementation in #9837 covered this and adds a new set of optimizations as well. |
Thanks for the link to #10879 - that looks like it covers things |
$ tsc --version Version 1.9.0-dev.20160505 $ node --version v5.10.1 # in case it's relevant to this discussion
We have a relatively modest ~210k lines of code/type definitions etc in our application.
Some of our core files are
import
-ed by many files (e.g. a core utility library). i.e. there are many dependents on such modules. Let's call this Group 1.Other files, e.g. tests, are never
import
-ed by any other files. i.e. there are zero dependents on such modules. Let's call this Group 2.We use
tsc --watch
to recompile when any of the files as referenced bytsconfig.json
are modified.The bizarre thing is that compile times are relatively constant, regardless of whether a file modification happens to a file from Group 1 or Group 2. In the following relatively unscientific tests, I simply
touch
-ed a file from the named group, i.e. bumped it's modification time, and observed the time stamps output fromtsc --watch
:Let's ignore the fact for a second there is a wide range of compile times
This doesn't seem to make much sense (but then I know very little about the compiler!) because Group 2 files have zero dependents.
Gut instinct would tell me that the re-compile times when changes are limited to a single Group 2 file should be an order of magnitude lower.
Can someone either correct this false expectation or chime in here?
Clearly we, like others, would love to see compile times fall as much as possible because it makes the development lifecycle that much more pleasant so I'd be more than willing to help debug/provide analysis on the above observation.
Thanks
The text was updated successfully, but these errors were encountered: