Skip to content

Conversation

juj
Copy link
Collaborator

@juj juj commented Aug 22, 2025

Split up test other.test_standalone_system_headers to parallelize test runtime. It is still a slow test (> minute runtime), but much faster than before.

Before: Ran 1 test in 272.024s

After:
Total core time: 386.746s. Wallclock time: 64.692s. Parallelization: 5.98x.

Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

lgtm.

Should we now remove @is_slow_test?

(BTW, when running tests I recommend almost always passing --skip-slow, although fixing slow tests like this is still a good thing).

# Process files depending on first char of the file in different test cases for parallelization, though
# special case SDL_ prefix to parallelize better.
first_char = (header[4] if header.startswith('SDL_') else header[0]).lower()
if first_char not in prefix or (prefix == '*' and ord(first_char) >= ord('a') and ord(first_char) <= ord('z')):
Copy link
Collaborator

Choose a reason for hiding this comment

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

(prefix == '*' and firstchar.isalpha())

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That wouldn't be strictly accurate, since the set of characters that return true on .isalpha() is much more than a-z. Though updated to smooth review along.

@juj
Copy link
Collaborator Author

juj commented Aug 25, 2025

Should we now remove @is_slow_test?

No, the test is still unfortunately slow, just not quite as slow as before.

@juj juj force-pushed the speed_up_standalone_system_headers_test branch from 760b992 to 0b96861 Compare August 25, 2025 19:29
@juj juj force-pushed the speed_up_standalone_system_headers_test branch from 0b96861 to a45ebea Compare August 25, 2025 19:39
juj added 2 commits August 26, 2025 00:39
…t runtime. It is still a slow test (> minute runtime), but much less than five minutes.
@juj juj force-pushed the speed_up_standalone_system_headers_test branch from a45ebea to 7329186 Compare August 25, 2025 21:40
@juj juj enabled auto-merge (squash) August 25, 2025 21:40
@juj juj disabled auto-merge August 25, 2025 23:34
@juj juj merged commit 4bc1eeb into emscripten-core:main Aug 25, 2025
28 of 30 checks passed
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