foreach() is slow in hot loops like these. Also, by moving frequently
used children to the front we reduce the effort to find them in
further iterations.
Change-Id: Ib5dceb82511fdd1cb59c50e1ab2485f5035fbef8
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
This is another category with another name.
Task-number: QTCREATORBUG-17768
Change-Id: I08701a33a768651cfba84d9869836a4bbbd1442e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Before
commit 8c90998fff
CppTools/ProjectManagers: Reduce ui blocking when loading projects
the displayName was set in the ProjectPartBuilder constructor. Now this
needs to be done explicitly.
Change-Id: I67655a3a5b8052344084e467bb08efd07ab86ab4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
doUpdateLocals() was called, but not re-implemented in the
combined case.
Task-number: QTCREATORBUG-17763
Change-Id: Id8c17ce0bda79cd61c57624aea5a05e4aad96c79
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This was forgotten in
commit 8c90998fff
CppTools/ProjectManagers: Reduce ui blocking when loading projects
Change-Id: I5c3a8a4015dd3b4389a21a80367a9eac7ebd95fd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Looks like the field was spelt 'times', not 'hitcount'.
Change-Id: I7226747ba7d41e9600cb66e95e7c59c6a226151b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The total time taken for a program should be the sum of durations of
events on the bottom of the stack. This is also what the flame graph
model does, and it results in useful percentages for total and self
times.
Recursion still has to be accounted for when showing the total time of
a specific event type, but we mark events with recursive calls and
show the time and percentage of recursion in the tooltip. As we already
showed binding loops on bindings and signal handlers before, this
integrates nicely.
Change-Id: Id4654e314bf86ce8bd06ceaaf93a67187c629adc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The text marks are little labels next to the lines in the editor
that tell you how much of total run time was spent in the
respective QML/JS construct during the last profiling session.
This is similar to what the valgrind profiler does.
We add the text marks only when the documents are loaded into an
editor. This keeps the number of text marks manageable. Multiple
events on a single line are shown using a tooltip.
Task-number: QTCREATORBUG-17757
Change-Id: Ie38b8ab880a718a1ef72ef343d84070ab34bc5bc
Reviewed-by: hjk <hjk@qt.io>
Move the parse context switcher and the additional preprocessor dialog
button to the left. Thus, the new order is:
...
minimized info bar buttons (not always there)
additional preprocessor directives button ('#')
parse context switcher (not always there)
outline widget
...
This is better for splits and makes logically also more sense since the
outline widget depends on the additional preprocessor directives and/or
the parse context.
Change-Id: I3378885a44938072e6a496ce1573d1675499c498
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Simplifies the only used code path through the model and a custom
signal.
Change-Id: I9bbab725cdd122b7261a8f14b101786e38e61e57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Because we don't now if a *.h file is a C or C++ header we provide both
as project file if a C and C++ file is present. But C++ is not readable
by C compiler. So we skip that files and hope there is no non referenced
C header, which is very very unlikely.
Change-Id: I5505713e759749c8a0738e11b70bb6b309412966
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
...because it potentially leads to long running processes, depending on
current the icecc/network state.
Change-Id: Ic4390d7c5aa1bf7c78e85a6777843379b2cdd24c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Make use of the right space. Also, this moves the scrollbars
to the border, which looks more conventional (and which was the case in
welcomescreen1).
Change-Id: Icad9dedf80832012227d5ee6fb05083180bddf5d
Reviewed-by: hjk <hjk@qt.io>
${AnyProject}::updateCppCodeModel() did two potentially not that cheap
operations in the ui thread:
(1) Querying the MimeDatabase for the mime type for the source files of
the project. In 99.9% of the cases no files need to be read for
this as the file extension will resolve the type. The expensiveness
comes from the sheer number of files that can occur.
(2) Calling compilers with the "(sub)project's compiler command line"
to determine the macros. While the caches avoid redundant calls,
the number of the unique compiler calls makes this still a
ui-freezing experience.
These two operations are moved into a worker thread. For this, the
expensive compiler calls are encapsulated in thread safe lambdas
("runners") in order to keep the "mutexed" data minimal. The original
API calls of the toolchains are implemented in terms of the runners.
While adapting the project managers, remove also the calls to
setProjectLanguage(). These are redundant because all of the project
managers already set a proper value in the constructor. Also, currently
there is no need (client) to report back detection of C sources in
project parts. This also keeps CppProjectUpdater simple.
There is still room for improvement:
* Run the compiler calls in parallel instead of sequence.
* Ensure that the mime type for a file is determined exactly once.
Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Make use of the right and bottom space. Also, this moves the scrollbars
to the border, which looks more conventional (and which was the case in
welcomescreen1).
Change-Id: Ib3553c588f0c24bbff8afeead1a3e69d4d77a00f
Reviewed-by: hjk <hjk@qt.io>
makefile.xml has bmake_var_modifiers_noarg and
bmake_var_modifiers_with_arg which are not defined.
Change-Id: Ice5bcaf86e7dbe90d4e9b2c52babbc62f9491e05
Reviewed-by: David Schulz <david.schulz@qt.io>
* remove unnecessary QLatin1String where possible
* foreach
* nullptr
* bad naming of static members
Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90
Reviewed-by: David Schulz <david.schulz@qt.io>
Avoid adding test functions again and put further data tags
directly below the respective test function.
Change-Id: I29775b836cc4584358ee67b5f07744986c6a6591
Reviewed-by: David Schulz <david.schulz@qt.io>
The argument parsing has some considerable overhead. We try to avoid that
with merging all content together in one file.
Change-Id: Icf426bb5d6a5569d59c180f94c7eab66a22a251c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>