On Thursday, April 30, 2020 at 11:52:33 AM UTC-5, Edward K. Ream wrote: > In this Engineering Notebook post I'll discuss the the code that draws Leo's outline pane...
> Comments are welcome, but please do so in a separate thread. Never mind. I have unlocked this thread and unpinned it from appearing at the top of the page. All comments are now welcome. Here are some further thoughts: 1. As I said in the original post, studying pyzo's code is unlikely to be useful. Leo's code base is just too different from Leo's. Instead, I recommend that *Leo's devs should focus on design issues*. 2. I agree with the comments made in #1585 <https://github.com/leo-editor/leo-editor/issues/1585>. Changes to Leo's code base must be made carefully and incrementally, ideally backed by existing or new unit tests. For example, I have been dithering about #325 <https://github.com/leo-editor/leo-editor/issues/325>. This issue is a good example of the risks and benefits of simplifying code. Imo, it's unbearably ugly to use per-file definitions of @cmd decorator instead of a single, global @g.command decorator. However, a cff shows that @cmd defines roughly 300 commands in Leo's core. Changing these commands must be done carefully and incrementally. This I intend to do. 3. Improving Leo's redraw code only makes sense if it significantly improved overall performance. That's not true now, and it would only become true if Leo were to support truly huge outlines. Imo, drawing only the *actually *visible nodes is the best way to redraw huge outlines because drawing actually visible nodes takes approximately constant time. Alas, drawing actually visible nodes is surprisingly tricky. It has low priority for me. *New summary* Pyzo's code is unlikely to help Leo. Design, not code, is where real progress lies. Infelicities in Leo's code should be fixed carefully and incrementally, with full notice of any possible problems. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/2051517a-05e9-4b3e-88ae-5481ba0d0ba6%40googlegroups.com.
