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

Optimize PeptideIndexer #5809

Merged
merged 7 commits into from
Feb 15, 2022
Merged

Optimize PeptideIndexer #5809

merged 7 commits into from
Feb 15, 2022

Conversation

cbielow
Copy link
Contributor

@cbielow cbielow commented Feb 11, 2022

Description

This PR removes the costly storage of all peptide hits in a std::map and uses std::vector instead.
Also each hit takes up less space now.

For an (extreme) dataset with 1e9 hits (!), the runtime reduces from 1h to 15min, while the peak memory usage reduces from 134 GB to 91 GB. The resulting idXML is 34 GB in size.

There is further potential (since there is another map) but that is for another PR.

This change also surfaced a small bug in the new AC implementation (#5776), which may report hits twice (which was not discovered since the results were stored in a map). This is also fixed now.

Checklist:

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes. (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI:

If your PR is failing you can check out

Note:

  • Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).

Advanced commands (admins / reviewer only):

  • /rebase will try to rebase the PR on the current develop branch.
  • /reformat (experimental) applies the clang-format style changes as additional commit
  • setting the label NoJenkins will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)

struct PeptideProteinMatchInformation
{
OpenMS::Size protein_index; //< index of the protein the peptide is contained in
OpenMS::Int position; //< the position of the peptide in the protein
Hit::T peptide_index; ///< index of the peptide
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Hit::T peptide_index; ///< index of the peptide
Hit::T peptide_index; //< index of the peptide

Copy link
Contributor Author

Choose a reason for hiding this comment

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

documenting members is done with ///< ...., so I guess it would be better to fix the other two members as well?
https://www.doxygen.nl/manual/docblocks.html#memberdoc

Copy link
Contributor

@jpfeuffer jpfeuffer left a comment

Choose a reason for hiding this comment

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

with minor doc suggestions

Copy link
Contributor Author

@cbielow cbielow left a comment

Choose a reason for hiding this comment

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

apply suggestions from review

Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
@cbielow cbielow merged commit 932488d into OpenMS:develop Feb 15, 2022
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