Closed ojeda-e closed 1 year ago
@hmacdope maybe you can help me with a review here, please?
@ojeda-e I don't have write access so you can just approve and merge yourself.
Thanks, @hmacdope!
Looks good to me @ojeda-e! Just out of curiosity what was the performance difference (roughly)?
I had a membrane-protein system with a 2500-frame trajectory and ~18900 atoms. Having explicit warning messages takes 57.38 seconds to iterate over the full number of frames, vs. 5.24 with the solution here implemented in WarnOnce. I understand it's just a particular case, but still, it is a significant difference. This solution saves quite a lot of time with the logger/print operation, which was too expensive with the explicit warning.
@ojeda-e I don't have write access so you can just approve and merge yourself.
Thanks for letting me know, I just added @MDAnalysis/gsoc-mentors as admin in the repo, it gave you write access right away.
Description
As described in #86, the explicit warning messages introduced in #83 significantly affect performance. In this PR I introduced the
WarnOnce
class insurface.py
, which provides an explicit message only once and after that triggers a generic message. It saves time when computing in membrane-protein systems, in particular. Tests were updated with regex that match both patterns.Status