QmlProfiler: Send loaded events in batches of about 1024

This significantly reduces the number of signals necessary when
loading traces. The overhead of queueing those signals across threads
was responsible for up to 80% of the time required to load a trace.

Change-Id: I461a2ef9944b0be102a29f8ed6b2b3f2f59f3c0f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2016-11-08 17:26:39 +01:00
parent a432683e0c
commit aaca50f705
5 changed files with 25 additions and 8 deletions

View File

@@ -378,8 +378,8 @@ void QmlProfilerModelManager::load(const QString &filename)
connect(reader, &QmlProfilerFileReader::notesLoaded,
d->notesModel, &QmlProfilerNotesModel::setNotes);
connect(reader, &QmlProfilerFileReader::qmlEventLoaded,
d->model, &QmlProfilerDataModel::addEvent);
connect(reader, &QmlProfilerFileReader::qmlEventsLoaded,
d->model, &QmlProfilerDataModel::addEvents);
connect(reader, &QmlProfilerFileReader::success, this, [this, reader]() {
d->traceTime->setTime(reader->traceStart(), reader->traceEnd());