On Monday, November 26, 2018 at 6:30:20 AM UTC-6, Edward K. Ream wrote: The Aha is that the redraw code *doesn't have to redraw all the visible > nodes.* > [snip]
...the PY side will pass a *redraw instruction list* to the JS side. By > definition, this instruction list specifies the minimum number of gui > operations needed to update the screen. > *Important*: it's not clear that the flx.TreeWidget or flx.TreeItem classes can actually take advantage of such a list. Indeed, it seems like only the following methods are relevant. - TreeItem.set_parent <https://flexx.readthedocs.io/en/stable/ui/tree.html#flexx.ui.TreeItem.set_parent> It *might* be possible just to reset the parents of the to-be-drawn tree items, but this would have to be done in outline order, for *all* visible widgets. I'll explore this avenue first, but there are no guarantees. - Widget_render_dom() <https://flexx.readthedocs.io/en/stable/ui/widget.html#flexx.ui.Widget._render_dom> This is a general-purpose fallback for all kinds of troubles. It would likely be a lot of work, and the performance implications are completely unclear. *Summary* It's important not to lose sight of the big picture. Imo, the redraw instruction list is worth any amount of effort: - The redraw list enforces a bigger divide between Leo's core and the gui code. It might eliminate all calls to c.redraw in Leo's core. - The redraw list is the gateway to general-purpose optimizations in leoflexx.py. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.