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

Collection iteration optimization #115

Merged
merged 40 commits into from
Apr 14, 2024
Merged

Conversation

alexdunnjpl
Copy link
Contributor

@alexdunnjpl alexdunnjpl commented Apr 9, 2024

🗒️ Summary

Overhauls ancestry sweeper - non-essential global state is eliminated in favor of iterating over collections when generating updates.

This results in vastly less peak memory usage while avoiding the need to use HDD for swap, and facilitates incremental processing even if job is killed or otherwise fails.

Squash when merging.

N.B. tqdm is introduced, but I've experienced some instability when running in debug mode in Pycharm. Investigation suggests this is platform-specific, so I'm keeping it in there, and a future update should resolve this, but it's something to be aware of and disabling the tqdm progress bar may be necessary during development.

This bug may be worked around by disabling the cython speedup extension with env var PYDEVD_USE_CYTHON=NO. This information has been added to the dev section in the readme

⚙️ Test Data and/or Report

One of the following should be included here:

  • Reference to regression test included in code (preferred wherever reasonable)
  • Attach test data here + outputs of tests

♻️ Related Issues

related to #108

this works out to ~1000 dump files if iteration takes one week, which seems sane
also fixes a bug in the test where expected content was compared with itself rather than the actual output
does not update deprecated scroll-based implementation
reverts 9548917
alternate_ids are not considered reliable for this purpose, and the relevant feature requires reimplementation
previously, nil records/updates would not cause failure of some test cases
setup.cfg Outdated Show resolved Hide resolved
@alexdunnjpl alexdunnjpl merged commit 0b65284 into main Apr 14, 2024
2 checks passed
@alexdunnjpl alexdunnjpl deleted the collection-iteration-optimization branch April 14, 2024 16:54
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