Skip to content

Load 'perf/info' and 'perf/get' in Comparison page asynchronously #1860

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

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

Zentrik
Copy link
Contributor

@Zentrik Zentrik commented Mar 15, 2024

Previously, 'perf/info' would load then a request would be made to 'perf/get' in loadCompareData. By moving await after loadCompareData, perf/get is requested then perf/info without a wait in between. I don't know if await is necessary but doesn't seem to hurt.

I don't know much js, but hopefully this is fine as it seems to work locally. It saves about 50-100ms for me.

Previously, 'perf/info' would load then a request would be made to 'perf/get' in `loadCompareData`.
By moving `await` after `loadCompareData`, `perf/get` is requested then `perf/info`. I don't know if `await` is necessary but doesn't seem to hurt.
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a bit dangerous if some of the TS setup code started using the info variable. But as long as the await is there, and only the UI template uses it, it should be fine.

Good idea, thanks!

@Kobzol Kobzol merged commit 11a3c71 into rust-lang:master Mar 15, 2024
Zentrik added a commit to Zentrik/rustc-perf that referenced this pull request Mar 28, 2024
Zentrik added a commit to Zentrik/rustc-perf that referenced this pull request Apr 27, 2024
Zentrik added a commit to Zentrik/rustc-perf that referenced this pull request Jun 23, 2024
Zentrik added a commit to Zentrik/rustc-perf that referenced this pull request Jun 23, 2024
Zentrik added a commit to Zentrik/rustc-perf that referenced this pull request Oct 13, 2024
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.

2 participants