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

Reduce time for fidelity test CI locally by 50s, Github CI by 130s #4543

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

bhouston
Copy link
Contributor

@bhouston bhouston commented Oct 26, 2023

These minor changes save a total of 50s out of the original 146s for each fidelity test run when run locally - thus a 32% savings. I know of a few more ways to save time (render the next test while evaluating the results of the current one, and then run tests in parallel), but this is the low hanging fruit.

These timings are from a Mac mini M2 Pro:

# Initial timing runs before these changes
% time npm run test
146.62s user 36.70s system 124% cpu 2:26.74 total

# Reuse browser, rather than creating a new one for each test. saves 42 seconds.
% time npm run test
60.20s user 4.59s system 61% cpu 1:44.97 total

# Create pages ahead of time, hides page creation time.  saves 8 seconds.
% time npm run test
111.77s user 15.31s system 131% cpu 1:36.66 total

Also looking at this PR's CI time for the fidelity tests, it appears to have reduce the wall clock from 10m 36s to 8m 28s (2m 10s) for the test run. I am comparing it to the CI time on this other PR: #4542

@bhouston bhouston changed the title Double speed of fidelity test CI - reuse browser, and create page ahead of time. Reduce time for fidelity test CI by 50s - reuse browser, and create page ahead of time. Oct 26, 2023
@bhouston bhouston changed the title Reduce time for fidelity test CI by 50s - reuse browser, and create page ahead of time. Reduce time for fidelity test CI locally by 50s - reuse browser, and create page ahead of time. Oct 26, 2023
@bhouston bhouston changed the title Reduce time for fidelity test CI locally by 50s - reuse browser, and create page ahead of time. Reduce time for fidelity test CI locally by 50s, Github CI by 130s Oct 26, 2023
Copy link
Collaborator

@elalish elalish left a comment

Choose a reason for hiding this comment

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

Ah, you have no idea how long this has been bothering me! Thank you for solving this in such a simple way.

@elalish elalish merged commit df26025 into google:master Oct 26, 2023
2 checks passed
JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
…oogle#4543)

* reuse browser, and create page ahead of time.

* fix log messages, now that browser only launches once.
@elalish elalish mentioned this pull request May 17, 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.

None yet

2 participants