Skip to content

Optimize the memory consumption

Alexander Semke requested to merge work/optimize-the-memory-consumption into master

In #186 the memory consumption after import and plotting was summarized. This MR addresses some of the points #186:

  • Points 2 and 3 - in 340f7bd4 the resizes of vectors were unified, everything is done via "insert rows", the memory consumption remains the same and we have now 2.7GB created via the call stack in 3.
  • Point 5 addressed in f491af70 - 268.4MB caused by QVector<int> for the vertical header were removed completely
  • Point 6 addressed in bd4cfd4d - replaced QVector by std::vector, memory consumption reduced by a factor of 8

With these improvements we're going to reduce the memory consumption for the example in #186 by ca. 300MB. Also, the handling of the vertical header in the spreadsheet model is faster now since there is no need to perform a lookup in the vector holding the row numbers.

Edited by Alexander Semke

Merge request reports