Skip to content
  • Waqar Ahmed's avatar
    lsp: Optimize diagnostics handling · 8cd615b0
    Waqar Ahmed authored
    Currently if a server sends a lot of diagnostics Kate becomes close to
    unsable. One such server is the dart-analyzer which for some reason is
    very eager about scanning every possible thing it can find in whatever
    directory you are.
    
    This patch includes some optimizations which makes the handling of
    incoming diagnostics a lot faster.
    
    Also, cache the KTextEditor::Attributes and reuse them so that kate
    doesn't eat up too much memory in case a doc has a lot of diagnostics.
    
    However, if you have a lot of diagnostics in the model and you close /
    switch docs, it's still very super slow. Removing diagnostics from the
    model file by file is not optimal at all. This needs to handled better.
    
    (cherry picked from commit 32585d18)
    8cd615b0