2009/7/30 Jeff Wheeler <jeffwhee...@gmail.com>:
>
> I've been reading back through issue #265 [1], and I expect that most
> of these comments apply to Pango. Particularly, drawing in a separate
> thread would be useful, I expect, and perhaps doing the syntax
> highlighting separately would be useful, too.
>
> I'm not at all experienced in threading in Haskell, but I'm doing my
> best to learn about how this applies to the Pango UI. Correct me if
> I'm wrong, but I think we're currently going through the cycle of
> redrawing all the text at each action (even cursor movement), all
> synchronously so that it has to be completely redrawn before the next
> action can be handled. This would explain why even things that don't
> affect syntax highlight --- such as just moving the cursor down
> several rows --- is sluggish.
>
> I don't know whether rendering asynchronously serves any greater
> advantage without smarter threading, because I'm not experiencing the
> window flashing between renders. A threaded solution could throw away
> incomplete solutions while new actions arrive.
>
> Does this all make sense, or am I completely off-target here?
>
> Jeff Wheeler
>
> [1] http://code.google.com/p/yi-editor/issues/detail?id=265

What operation will asynchronous rendering make faster? Pasting to the
Pango frontend is already fast because we insert all the characters at
once. Pasting to the vty frontend could be improved by only redrawing
when there is no more tty input.

Cursor movement really should be fast enough not to need threading.
For me, this is the most frustrating problem. All updates are treated
the same and cause a complete refresh. There could be a fast path for
updates that only change the display. Other editors are written to
minimize the amount that needs to be redrawn. Perhaps FRP could help?

Threading will be necessary for doing syntax highlighting in the
background. But threading won't improve basic editing operations.

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to