Fix profiling of QML/JS compilation
authorUlf Hermann <ulf.hermann@theqtcompany.com>
Tue, 11 Aug 2015 10:47:28 +0000 (12:47 +0200)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Mon, 24 Aug 2015 19:24:20 +0000 (19:24 +0000)
commit6d5caee804ca80eb81c364624847f70e62caa92e
tree8256be366f5def91c541fc9a525c9baa02a40f84
parent9dd496c069154ac655be9b85b72a6eb409bfa223
Fix profiling of QML/JS compilation

The compilation of .js resources was missed and the compile times were
underestimated because the dependency resolution and error checking
wasn't factored in. In particular we only profiled the done() step for
QQmlTypeData. However, JavaScript compilation also occurs in the
dataReceived() step of QQmlScriptBlob and QQmlTypeData will already
parse the program into an AST at that step.

Compile steps can be nested now, but considering the fact that
significant time may be spent before and after compiling dependencies
for a parent module, this seems to be the best way to model them.

Furthermore, in order to not needlessly convert QUrl to QString at
runtime, the compilation profiler saves the files now as QUrl.

Change-Id: I215a87787f9117c069ecd77b2d913cc0b0ff3c89
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp
src/qml/debugger/qqmlprofiler_p.h
src/qml/qml/qqmltypeloader.cpp