D18551: clang: Create preamble only on second parse

Aaron Puchert noreply at phabricator.kde.org
Tue Jan 29 22:06:41 GMT 2019


aaronpuchert added a comment.


  In D18551#401594 <https://phabricator.kde.org/D18551#401594>, @rjvbb wrote:
  
  > Aaron, don't your arguments apply to parsing an entire project on startup as well? I can easily imagine that opening and parsing entire projects of the size you mention must have a non-negligible cost regardless of all optimisation and caching that is currently implemented
  
  
  It definitely does. Sometimes I just cancel it, but sometimes I need the entire index to understand some code. (“Find uses” is very useful for that.)
  
  > Probably in the sense that you create the preamble on first parse only when not parsing the entire project on import. I'd think that this should maintain the status quo for those files that the user actually opens, while not generating preambles for all the other files.
  
  I think that's roughly what @mwolff meant in his comment as well: to create preambles only for open files. It's definitely a nice idea, because then we can immediately do code completion for all open files. But as I mentioned, some open files are never changed, especially when a user is just browsing the code to understand it. So I could definitely live with this, but I would slightly prefer going with the default, meaning to build the preamble only on first reparse. I don't think that hurts too bad. If I'm the only one who thinks that way however, I would change the patch to create preambles only for open files.

REPOSITORY
  R32 KDevelop

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/20190129/32484a3f/attachment-0001.html>


More information about the KDevelop-devel mailing list