Reduce peak memory consumption when pasting data into the spreadsheet
The problem originally reported in https://bugs.kde.org/show_bug.cgi?id=468209. Reproduce/tested with numeric data, 150k rows and 20 columns copied from a text editor and pasted into the spreadsheet in labplot.
Memory consumption before 66d07cef (Massif file massif.out.24481):
Memory consumption after 66d07cef (Massif file massif.out.23971):
With the improvement done in 66d07cef, the peak memory consumption went down from 514MB to 323MB.
More optimizations can be done here by reducing the number of QStringLists (switch from row-major to column-major algorithm) or by getting rid of them completely and iterating over the QByteArray directly.
Edited by Alexander Semke