Skip to content
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

WIP: Re-use previous analysis if dependency graph is unchanged #4927

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Jan 7, 2024

Fixes #4907.

@gzm0
Copy link
Contributor Author

gzm0 commented Jan 7, 2024

Opening this to share first benchmarking results.

@gzm0
Copy link
Contributor Author

gzm0 commented Jan 7, 2024

no-change: org.scalajs.linker.analyzer.internal.simulateChangedInfo = false
fake-change: org.scalajs.linker.analyzer.internal.simulateChangedInfo = true
optimistic: including second commit

plot
plot-crop

logger-timings.csv

@gzm0
Copy link
Contributor Author

gzm0 commented Jan 28, 2024

@sjrd I'd appreciate your opinion on this: For the initial linking step, there clearly seems to be a cost to doing this analysis, but there is also clearly a massive speed gain by doing it.

I would expect that dependency preserving changes are not so rare when doing incremental development (especially when fiddling with UI and what not). So to me, this is not very clear cut :-/

@sjrd
Copy link
Member

sjrd commented Jan 28, 2024

I'm still uneasy about this. The situations where it applies are still quite rare. Even for UI tweaking, when it's not CSS-only changes, I feel like calling one method more or less (like putting an additional div() or span()) have the potential to change the infos.

What would be convincing would be an in-situ noticeable difference. Try with and without the changes, on a real(-ish, possibly demo) codebase, making small changes and test whether it feels any faster. If the difference can be perceived in situations where it matters, that would make a good case for this optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimized compiler and linker processing of changes to literals and source code formatting
2 participants