Make the TPR parser a bit faster#2804
Merged
richardjgowers merged 3 commits intodevelopfrom Jul 2, 2020
Merged
Conversation
A function in the TPR parser calls list.pop thousands of times, which is slow. This commit avoids that exansive call. Taking the TPR from https://github.com/bioexcel/covid_modelling_simulation_data/tree/master/spike_protein/full_spike/trimer the parsing time on my computer goes from 25.6s to 9.39s. On a more pathological TPR file, it goes from 3 minutes to about 6s.
richardjgowers
approved these changes
Jun 29, 2020
Member
richardjgowers
left a comment
There was a problem hiding this comment.
@jbarnoud looks solid, thanks!
Codecov Report
@@ Coverage Diff @@
## develop #2804 +/- ##
===========================================
- Coverage 92.22% 92.08% -0.14%
===========================================
Files 184 183 -1
Lines 24141 23670 -471
Branches 3123 3083 -40
===========================================
- Hits 22263 21797 -466
+ Misses 1813 1808 -5
Partials 65 65
Continue to review full report at Codecov.
|
Member
|
Could be backported to 1.0.1 via PR #2798. |
orbeckst
pushed a commit
that referenced
this pull request
Jul 3, 2020
* Make the TPR parser a bit faster A function in the TPR parser calls list.pop thousands of times, which is slow. This commit avoids that exansive call. Taking the TPR from https://github.com/bioexcel/covid_modelling_simulation_data/tree/master/spike_protein/full_spike/trimer the parsing time on my computer goes from 25.6s to 9.39s. On a more pathological TPR file, it goes from 3 minutes to about 6s. * Update changelog for #2804 Co-authored-by: Richard Gowers <richardjgowers@gmail.com>
orbeckst
pushed a commit
that referenced
this pull request
Jul 12, 2020
* Make the TPR parser a bit faster A function in the TPR parser calls list.pop thousands of times, which is slow. This commit avoids that exansive call. Taking the TPR from https://github.com/bioexcel/covid_modelling_simulation_data/tree/master/spike_protein/full_spike/trimer the parsing time on my computer goes from 25.6s to 9.39s. On a more pathological TPR file, it goes from 3 minutes to about 6s. * Update changelog for #2804 Co-authored-by: Richard Gowers <richardjgowers@gmail.com>
PicoCentauri
pushed a commit
to PicoCentauri/mdanalysis
that referenced
this pull request
Mar 30, 2021
* Make the TPR parser a bit faster A function in the TPR parser calls list.pop thousands of times, which is slow. This commit avoids that exansive call. Taking the TPR from https://github.com/bioexcel/covid_modelling_simulation_data/tree/master/spike_protein/full_spike/trimer the parsing time on my computer goes from 25.6s to 9.39s. On a more pathological TPR file, it goes from 3 minutes to about 6s. * Update changelog for MDAnalysis#2804 Co-authored-by: Richard Gowers <richardjgowers@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A function in the TPR parser calls list.pop thousands of times, which is
slow. This commit avoids that exansive call.
Taking the TPR from
https://github.com/bioexcel/covid_modelling_simulation_data/tree/master/spike_protein/full_spike/trimer
the parsing time on my computer goes from 25.6s to 9.39s. On a more
pathological TPR file, it goes from 3 minutes to about 6s.
Changes made in this Pull Request:
PR Checklist
- [ ] Tests?- [ ] Docs?