I'm not crazy about complex systems being kept in sync unless absolutely necessary. Always increases complexity and creates a horde of potential error conditions that you need to keep in mind for the smallest step, and really can do without. Even on the design level it can be hard to think clearly about which of the two states are "right" until they are in sync.
As long as the 'real' buffer, the folding ranges and their states can be sufficient to reconstruct the display state, then that full-round-trip model should be used to define correct behavior. Now, the implementation of the folding display layer might of course choose to use some form of caching to improve performance, but that is an optimisation, and comes with all the usual caveats: - Don't do it until you're sure that what it addresses is indeed a significant bottleneck. The cost is not just the added work, but also the added complexity and reduced flexibility impacting all later work. It better pay of in important ways to justify that. - It should be completely internal to the component that uses it, and have no power to affect its spec: if behavior differs from the unoptimized version, there should be no doubt that the optimisation is at fault, and forcing a full refresh from the background state should always work as a quick- fix. On Sat, Mar 15, 2008 at 5:54 PM, Randy Kramer <[EMAIL PROTECTED]> wrote: > I've written a rough draft of a proposal for "back end" changes to Nedit to > support folding. See: > > http://twiki.org/cgi-bin/view/Wikilearn/NeditFoldingDesignBackEnd > > Let me know what you think. I suspect it will sound ridiculous to some, but > I > actually think it is a reasonable approach. > > Randy Kramer > -- > NEdit Develop mailing list - [email protected] > http://www.nedit.org/mailman/listinfo/develop > -- NEdit Develop mailing list - [email protected] http://www.nedit.org/mailman/listinfo/develop
