Page MenuHomePhabricator

Save / Load Project takes too long
Closed, ResolvedPublic

Description

  • Load 3 Images (maybe one big one)
  • Save Project (took over 3 minutes)
  • Load Project (took again about 3 mnutes)

Why is that taking so long?
When i save the images separatly, takes about 20 seconds
When I load them separatly, takes again about 20 seconds.

Maybe compression is set to "super high" ?

Anyways, the MITK scene file is about the same size. Saving in Nrrd format is already performing compression.

Event Timeline

correction: MITK scene file Loading/Saving takes over 5 minutes .. MUCH MUCH longer than doing it separatly.

Loaded 15 Calcaneus-images (nrrd files) in 10 seconds and saved them as a MITK scene file (5 minutes). Loading the saved scene file took again about 5 minutes. Very annoying if you want to show a physician some datasets...

MITK Scene files are archives. Maybe it takes so long because of a "extremly high" compression rate.

The compression is done by the Poco::Zip:Compress class. Changing the compression level from default (maximum) to CL_SUPERFAST or using another compression method (default is deflate) didn't change anything. So the compression seems not to be the problem.

Could you please try to profile this with a Linux machine or find someone to do it?

In Linux loading and saving time vary heavily. Sometimes 8 images can be loaded immediately (1-2 seconds), sometimes the loading process is more than 10 times slower...

Need to examine Load function. Maybe basedata is casted in all available basedata-derived classes, to see which one does not fail. This might take a long time.

the whole callgrind graph

Valgrind callgrind showed, that 60 % of the computation time is spent in a method called GetScalarValueMin(int).

The loaded scene contained:
9 ct images
9 segmentations
9 surfaces, which were generated from the segmentations

See the previously attached files to get more informations.

A comparison of the callgrind results from a single nrrd file and a scene file with the same image would be perfect. The method GetScalarValueMin(int) is also called when the nrrd file is opened (this is not the problem).

New remote branch pushed: bug-12195-SaveLoadProjectTakesTooLong

[fdd3a1]: Merge branch 'bug-12195-SaveLoadProjectTakesTooLong'

Merged commits:

2013-02-06 14:27:55 Michael Brehler [bc5e26]
changed temp path from home to local