QmlProfiler: Use a temporary file to store the master event list

As we only ever iterate the master event list in a linear fashion, we
can use a temporary file to store it. This should allow for larger
traces to be handled without running out of memory.

Change-Id: I0d2aea6f998458fe5f426f6fef0f6937e915ae68
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Ulf Hermann
2016-04-29 18:38:54 +02:00
parent 914e1e1fe1
commit 0f513bc91e
4 changed files with 31 additions and 32 deletions

View File

@@ -522,8 +522,7 @@ void QmlProfilerFileWriter::setFuture(QFutureInterface<void> *future)
void QmlProfilerFileWriter::save(QIODevice *device)
{
if (m_future) {
m_future->setProgressRange(
0, qMax(m_model->eventTypes().size() + m_model->count() + m_notes.size(), 1));
m_future->setProgressRange(0, qMax(m_model->eventTypes().size() + m_notes.size(), 1));
m_future->setProgressValue(0);
m_newProgressValue = 0;
}