-
Notifications
You must be signed in to change notification settings - Fork 12.9k
avoid computing a full shape for indirectly invalidated files #44090
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
Conversation
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
Thank you @sokra for investigating and coming up with this. We will soon look into this. Note to self todo Next week:
|
Note that using file version as signature has also some destructive effect to |
@amcasey @andrewbranch |
@sokra Thanks for your patience! I think we've concluded that the best way to validate this is to get it into the 4.4 beta. Can you please address the conflicts so we can merge the PR? |
using file version as shape is enough to keep build info valid and it's much cheaper
daea8a2
to
8e20a9a
Compare
@amcasey rebased and updated baselines for some newly added test cases. |
also see #44690 for a little performance fix I found during implementing this pr... |
This fixes a worse case performance scenarios when a file has been changed that indirectly affects a lot of other files.
In such cases
handleDtsMayChangeOf
will be called for all indirectly affected files and will callupdateShapeSignature
to keep the build info valid. This means a lot files will have their shape computed and we already know that this is expensive.This PR will switch all indirectly affected files to
useFileVersionAsSignature
mode, which is cheaper and the signature doesn't affect this update anyway. It will indeed affect future updates to these files, as not having a up-to-date signature will always invalidate referencing files.To test this I added a list of files that have their shape computed (and in which way) to the baselines (first commit). Please make sure to review each commit on its own to avoid a lot of noise.
Open Questions
handleDtsMayChangeOf
to a point after all affected files have been processed?This would make sure that these files would use full signature instead of signature as file version
We could keep a list of these files and process them when
getNextAffectedFile
isDone
disableUseFileVersionAsSignature
for this too?cc @sheetalkamat