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
Large (original_) metadata significantly slowing hyperspy methods #2536
Milestone
Comments
As mentioned in previous issues on
|
5 tasks
@ericpre can we close this issue now? |
Not yet, we still need to make copying metadata optional and disable it when it is necessary, for example plotting, etc. I am looking at this at the moment. |
6 tasks
6 tasks
Fixed in #2691. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I experience rather significant slowdowns when I use hyperspy to either index or plot signals with large
original_metadata
. On my datasets times go from 280 ms to 30 sec when plotting.I've tried creating a minimum working example, but the slowdowns are nowhere the same, and appear to be equal to the time (40 ms) needed to copy the array I'm adding to the metadata:
While I'm not particularly concerned with these times - should the above be copying the
original_metadata
withinav
, rather than just referring to the originaloriginal_metadata
?Here are some examples on a <40 | 500, 500> dataset nonrigidly corrected for drift with Smart Align. SA appears to save the previously processed datasets (raw data and rigidly corrected) in the original metadata.
Link to datasets here, with and without the processing done by Smart Align. I've included a large (~200 MB) and a small (~16MB) test case.
The problem is "taken care of" by calling
s.original_metadata = s.original_metadata.__class__()
to overwrite it with an empty metadata object, but it would be good to handle this better in the future. In particular,s.plot()
is very slow.Large example (~200 MB file)
In the attached small file, some metadata tags take much longer to display than others:
r.original_metadata.ImageList.TagGroup0.ImageTags.Parent
is instant, andr.original_metadata.ImageList.TagGroup0.ImageTags.SmartAlign.Tx_store
takes forever.I'm not familiar with the DictionaryTreeBrowser, so I'm not sure what to suggest.
The text was updated successfully, but these errors were encountered: