D18551: clang: Create preamble only on second parse
René J.V. Bertin
noreply at phabricator.kde.org
Mon Jan 28 09:54:10 GMT 2019
rjvbb added a comment.
Replying to a remark by Milian on D17289 <https://phabricator.kde.org/D17289> where this idea came up:
> we use CXTranslationUnit_CreatePreambleOnFirstParse to get code completion results fast. otherwise the first code completion request would create the preamble, which felt much worse
Felt or has this been quantified - and if so are those numbers still representative?
I'm guessing that I should get that same "worse feeling" with my habit of not parsing an entire project when opening it. I never had that feeling, having to wait the additional time while KDevelop burns CPU to do things (AGAIN) I will probably never require is much worse IMHO.
It's self-evident that parsing a file is not instantaneous, there's always a lag between the moment you (re)open a file and the parser is done (it seems the parser always gets triggered even when you reopen a file). I've never really noticed this to be worse the 1st time I open a file but I guess that's because there too I know that this is to be expected. Code colouring gives good feedback here, btw.
I cannot comment on the lag before code completion becomes available, it's very rare that I need this in the interval after opening a file and locating the spot where I want to change something.
On a general note: I take it libclang doesn't provide the information used by the parser in sequential fashion (I've never noticed a "syntax colouring wave" move from top to bottom through the file)?
REPOSITORY
R32 KDevelop
BRANCH
build-preamble-on-reparse
REVISION DETAIL
https://phabricator.kde.org/D18551
To: aaronpuchert, #kdevelop, mwolff, brauch, rjvbb
Cc: rjvbb, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190128/5dca7b72/attachment.html>
More information about the KDevelop-devel
mailing list