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

Fix filter bin selection performance bug #74

Merged
merged 3 commits into from
Mar 22, 2022

Conversation

pshriwise
Copy link
Collaborator

I noticed that it takes a very long time to unselect an entire category of bins in the plotter. This is caused by each bin making a call to the TallyDock.updateFilters method, which results in a lot of wasted calculation.

This PR removes callback connections to the filter, scores, and nuclides trees and reads the state of the trees using TallyDock.updateModel only when a new plot is generated (i.e. Apply Changes is clicked). It also updates the TallyDock.updateFilters method with logic if for filters where all or none of the bins are selected to improve speed.

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

One small change:

openmc_plotter/docks.py Outdated Show resolved Hide resolved
pshriwise and others added 2 commits March 22, 2022 10:52
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
@paulromano paulromano merged commit 0166373 into openmc-dev:develop Mar 22, 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.

2 participants