D18551: clang: Create preamble only on second parse
noreply at phabricator.kde.org
Thu Feb 14 00:40:43 GMT 2019
aaronpuchert added a comment.
In D18551#411309 <https://phabricator.kde.org/D18551#411309>, @rjvbb wrote:
> Well, if among developers you cannot find a solution that covers all use cases a configurable setting (applying only to setting the preamble-on-first parse flag or not) could well be the only compromise.
I wouldn't want to give up on a consensus just yet. I think the Clang developers have actually chosen a pretty smart default, and this additional flag incurs costs that are hard to control for hardly any benefit.
To some extent this resembles the classic latency/throughput discussion. Just with a minor twist: we increase the overall load of the program for a one-time latency reduction. Keeping unnecessary preambles is problematic regardless of whether `/tmp` is a RAM disk or not — if it is, we consume valuable memory without using it, if it isn't, we incur unnecessary disk I/O.
>> I would rather make sure that the currently active document (meaning it has keyboard focus) is always up-to-date.
> But that's a different issue, isn't it? Can the parser even be expected to react to changes to a headerfile that don't lead to a change notification?
I can't say how hard it would be technically. But since we watch files anyway, we could also track dependencies and reparse active documents if a dependency has changed. Of course that's a separate issue and probably not easy to solve.
To: aaronpuchert, #kdevelop, mwolff, brauch, rjvbb
Cc: rjvbb, kdevelop-devel, gennad, glebaccon, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel