On 4/20/2021 4:35 PM, Kyle Edwards wrote:
On 4/20/21 10:18 AM, Matthew Woehlke wrote:
It's well known that you*have*  to highlight the whole file, at least
to the current position, for accurate ("perfect") highlighting.
If I understand correctly, you have to*analyze*  the whole file, but not
necessarily*highlight*  it. (Though, once you've completed the analysis,
highlighting it is a relatively trivial step, and skipping it for
non-visible parts of the file may not yield a whole lot of savings.)

Mostly correct Kyle.

With the structure/design of QPlainTextEdit you have to *analyze* in the single-thread-i-ness main event loop. So, when someone opens and editor with 4-7 large source files opened in tabs, the one you really need, the last one, is jammed up in the single-thread-i-ness main event loop behind the other tabs you cannot see because they were in first load order.

QPlainTextEdit forces you to *highlight* during *analyze* using regular expressions . . . assuming you use it as designed.

As Matthew has pointed out, KATE doesn't do this. Last I looked at the code it creates worker threads for everything.

One note though. KATE (or katepart as Mathew prefers) has to be using more than just regular expressions because it actually highlighted the initializer list correctly.

Thanks for participating in the conversation.

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593

https://theminimumyouneedtoknow.com
https://infiniteexposure.net
https://lesedi.us
https://johnsmith-book.com
https://logikalblog.com
https://interestingauthors.com/blog

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to