Ticket #11483 (closed: fixed)
Profile Loading and Saving via Mantid Projects
Reported by: | Owen Arnold | Owned by: | Harry Jeffery |
---|---|---|---|
Priority: | major | Milestone: | Release 3.4 |
Component: | Reflectometry | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Owen Arnold |
Description (last modified by Harry Jeffery) (diff)
I've heard reports that Mantid is really slow to load and save data via Projects. This is likely to be with large multiperiod workspaces.
This ticket is only to establish the causes of the issue. Try using INTER try both runs 27729 and 27731.
Change History
comment:2 Changed 6 years ago by Harry Jeffery
- Status changed from assigned to inprogress
- Description modified (diff)
comment:3 Changed 5 years ago by Harry Jeffery
- Status changed from inprogress to verify
- Resolution set to fixed
This ticket has resulted in:
- #11503 - Provide feedback while opening workspaces in projects
- #11505 - Improve LoadProcessedNexus performance on multiperiod workspaces (10x speedup)
- #11514 - Improve LoadProcessedNexus performance on multiperiod workspaces (another 10x speedup)
Loading projects is *much* quicker than it was, but there's still a noticeable delay when loading multiperiod workspaces.
The cause of this comes from FileLoaderRegistry::chooseLoader. When attempting to identify the loading algorithm to use, it instantiates NexusDescriptor which in its initialize method creates a NeXuS::File and traverses the entire nexus graph of the file as a depth first traversal. The traversal is done by calling the recursive function, walkFile which uses NeXuS::File::getEntries to get the children at each node, and calls itself once per child.
This traversal is currently the most expensive part of loading multiperiod workspaces by far, but there is not yet a clear way to avoid doing this work. The point at which this is executed is *before* we know what kind of NeXuS file it is.
In addition, a problem has been identified when saving projects containing multiperiod workspaces: Each period is saved out as an individual nexus file. Re-loading each period individually is about 3x slower than a single multiperiod nexus. Projects should save multiperiod groups as a single file. I have created a ticket for this: #11548