Commit 0651eddb authored by Nikolai Kosjar's avatar Nikolai Kosjar

Clang: Stop needless completion detail calculation

...on the plugin side by removing a left over calculation. We construct
the detail in the virtual ClangAssistProposalItem::detail(), that is, on
demand.

Test:
 1. Open src/plugins/clangstaticanalyzer/unit-tests/qt-essential-includes.pro
 2. Open main.cpp
 3. Complete in the main function

Measured with a timer in IpcReceiver::codeCompleted.

On Linux, for 20637 completion items:
 Before: 119ms (avg)
    Now: 81ms (avg)
   Gain: 32%

Change-Id: I9617cb9651a8367c31cd40e965175b5b37e10730
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent 16c007a0
......@@ -91,8 +91,6 @@ QList<AssistProposalItemInterface *> toAssistProposalItems(const CodeCompletions
item->addOverload(codeCompletion);
} else {
item = new ClangAssistProposalItem;
QString detail = CompletionChunksToTextConverter::convertToToolTipWithHtml(codeCompletion.chunks());
items.insert(name, item);
item->setText(name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment