Skip to content
  • Nikolai Kosjar's avatar
    Clang: Hook up supportive translation unit on first edit · 380d756a
    Nikolai Kosjar authored
    
    
    Parsing happens rotationally on the translation units.
    
    The recently parsed translation unit is used for completion jobs while
    the older version is used for parse jobs.
    
    Advantages:
      A1. A completion job cannot be blocked anymore by currently running
          parse job.
      A2. Faster triggering of parse jobs. A reparse was triggered about
          1650ms after the last keystroke. This is down to 500ms now since we
          do not have a blocking translation unit for the completion anymore.
    
    Disadvantages:
      D1. Memory consumption is doubled for an edited document.
          This could be addressed by suspending the second translation unit
          after some time of inactivity.
      D2. Setup of the supportive translation unit takes some time.
    
    Change-Id: I958c883c01f274530f5482c788c15cd38d6f4c3e
    Reviewed-by: default avatarDavid Schulz <david.schulz@qt.io>
    380d756a