-
Notifications
You must be signed in to change notification settings - Fork 415
feat(test-fill): speed up filling #2079
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
feat(test-fill): speed up filling #2079
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2079 +/- ##
===================================================
- Coverage 86.14% 86.07% -0.07%
===================================================
Files 599 599
Lines 39472 39472
Branches 3780 3780
===================================================
- Hits 34002 33977 -25
- Misses 4848 4862 +14
- Partials 622 633 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
marioevz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments but overall looks excellent, thanks!
|
Thanks @marioevz! I believe I added all your suggestions, if you can double check the last commit 👀 |
2e5ae21 to
c47b5af
Compare
c47b5af to
9e23f59
Compare
|
Still looking into some things after rebasing with #2080, will re-mark as ready when it's ready to go. |
a7a1d61 to
90bfd72
Compare
90bfd72 to
fa66382
Compare
|
@marioevz ok this is ready for review again! |
… tail - mark more slow tests
- xdist workers were writing to the same fixture JSON file causing O(n²) work... each worker had to read, parse, and rewrite all previous entries. - now workers write to their own partial JSONL file (append-only, O(1)) - test_blob_txs.partial.gw0.jsonl - test_blob_txs.partial.gw1.jsonl - etc. .. and at session end, ``merge_partial_fixture_files()`` combines all partials into the final JSON file Test teardown on some tests dropped from ~80s to ~1s
fa66382 to
00a835c
Compare
|
@marioevz or anyone reviewing... the last commit here essentially removes the smaller gains from two commits before it (here) with pre-serialization (holding in memory). I only did this to help our good friend, the If we find another solution to help Putting some
|
Seems like there's less than a 2min difference between dropping the pre-serialization and not and it seems to be better for |
marioevz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, testing this locally it really helps out to speed up the process!
🗒️ Description
HashableItem.from_index_entries()and add tests to ensure same hashes are produced - from O(n^2) to O(n):Each entry is now inserted once by walking its path components (bounded depth, typically 3-5 levels). The conversion visits each trie node exactly once. Total: O(n). No redundant scanning, no relative_to(), no ValueError try/except.--no-htmlfor releases since we don't publish the html in the artifacts, this is not needed (small win)IndexFileonce, not at every single file (just one validation instead of potentially +100k times)teardownphase significantly (seeing some improvements from ~80s to ~1` in some longer tests).--durations=50forpy3run so we can see the slowest 50 durations. Anything in the ~200s and above range was marked as a slow test in this PR.✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.Cute Animal Picture