Can we see the code? By the way, adding qDebug() statements slows down the whole operation several times.
Can we see the code? By the way, adding qDebug() statements slows down the whole operation several times.
Yeah I know qDebug slows it down but it is the same across runs. The only difference was the data set size and it only outputs a qDebug when it starts and finishes as in the following:
Qt Code:
qDebug() <<"Saving id map"; outstream << idMap; qDebug() << "Done saving id map";To copy to clipboard, switch view to plain text mode
That debug hit should be the same whether I have 1 or 10 million records in the map, as it is in a save function that is called only once.
I've written some basic code to create QMultiHashes of "small,medium,large" sizes to isolate the problem and managed to narrow it down to the problem being due to a large number of repetitive keys in the QMultiHash, not the sheer number of them. When I create a set of 150,000 with a large percentage of repeated keys it bogs badly, but with a low percentage it is nice and zippy. I've not yet narrowed down the exact profile, I'll need to write some more specific code to determine a better performance profile.
--
The Real Bill
Bookmarks