[Github-comments] [geany/geany] Freezing for a long time when replacing strings (#2092)
Colomban Wendling
notifications at xxxxx
Thu Feb 28 13:10:05 UTC 2019
> @b4n, better to not try to be smart, it will always be wrong somewhere, users are too good at finding new things to do that we never thought of.
hehe yeah they are. However I found a not-really-smart (yay) but pretty nice technique based on [`g_signal_has_handler_pending()`](https://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-has-handler-pending) to prevent most of the computation when it won't be consumed anyway. I need to check if it doesn't break the accessible when it's actually used, but it's pretty promising for now (e.g. with my initial attempt I can do the replaces mentioned here with a much more reasonable delay -- a couple of seconds).
It still doesn't help the case where accessibility is used, that'll be a matter of optimizing the position-to-character conversion. Fortunately AFAIK there's position cache available in latest Scintilla that the accessibility layer could use. We'll see.
--
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/issues/2092#issuecomment-468266633
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190228/70932852/attachment.html>
More information about the Github-comments
mailing list