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

Make metadata decoding eager. #2432

Closed

Conversation

jeromekelleher
Copy link
Member

One potential approach to solving #2431

This might be too extreme though, because it makes all metadata encoding eager, and so there may be performance implications when, say, iterating over the nodes in a tree sequence without accessing the metadata (when there is significant metadata present).

This showed up some problems in the test suite where we have undecodable metadata in one of the example legacy tree sequences.

@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #2432 (8c352a4) into main (c12c160) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2432      +/-   ##
==========================================
- Coverage   93.34%   93.33%   -0.01%     
==========================================
  Files          28       28              
  Lines       27006    26967      -39     
  Branches     1253     1246       -7     
==========================================
- Hits        25209    25170      -39     
  Misses       1763     1763              
  Partials       34       34              
Flag Coverage Δ
c-tests 92.26% <ø> (ø)
lwt-tests 89.05% <ø> (ø)
python-c-tests 70.82% <91.66%> (-0.09%) ⬇️
python-tests 98.92% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
python/tskit/metadata.py 98.93% <ø> (-0.09%) ⬇️
python/tskit/tables.py 98.95% <100.00%> (-0.01%) ⬇️
python/tskit/trees.py 98.66% <100.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c12c160...8c352a4. Read the comment docs.

@jeromekelleher
Copy link
Member Author

See #2439 for the quick solution to memory leak, borrowing ideas from this PR.

Closing this PR as making things fully eager is a step too far.

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.

1 participant