[Github-comments] [geany/geany] Scintilla: faster a11y (#2097)

Colomban Wendling notifications at xxxxx
Sun Mar 3 13:06:34 UTC 2019


2 changes to make a11y quite a bit faster especially when performing bulk search & replace.

The first commit makes use of the character offset cache when performing reverse-lookup, e.g. when we need to convert a position given by the a11y layer to one understood by Scintilla.

The second avoids clearing the cache when it gets invalidated, and instead updates it to be valid right away. This avoids potentially costly re-computation of the cache that becomes problematic when we often need a position near the end of the file but keep invalidating everything after lines near the start.  This happens especially when performing bulk search & replace with the cursor near the end.  This gives a slightly higher cost at invalidating the cache (that now updates it based on a known delta), but a lot less when it's content is needed again.

Fixes #2092.
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/2097

-- Commit Summary --

  * scintilla: GTK: a11y: Optimize byte to character offset conversion
  * scintilla: GTK: a11y: Avoid clearing cache when possible

-- File Changes --

    M scintilla/gtk/ScintillaGTKAccessible.cxx (15)
    M scintilla/gtk/ScintillaGTKAccessible.h (14)

-- Patch Links --

https://github.com/geany/geany/pull/2097.patch
https://github.com/geany/geany/pull/2097.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190303/28523fd5/attachment.html>


More information about the Github-comments mailing list