On Tue, 25 Aug 2015 10:18:47 -0700 (PDT) "Edward K. Ream" <[email protected]> wrote:
> On Tuesday, August 25, 2015 at 9:53:01 AM UTC-5, Edward K. Ream wrote: > > > ...it's time to declare that configuration setting should never be > cached. Instead code should always call c.config.getX. We shouldn't > sacrifice flexibility to save a few millionths of a second here and > there. > > There is an alternative, namely to call x.updateSettings for all > classes x that have an updateSettings method. This would "re-cache" > settings. In the absence of evidence to the contrary (which no one is looking for ;-) I'm ok with "don't cache" as a "rule", and converting existing self.foo = c.config.get... lines. I doubt there's many cases that are causing much friction except styles, abbreviations, and key-bindings. I think the last two have their own methods for run-time changes, but it would be nice if you only needed to know about settings and "Reload settings" would deal with those three. Note there is no "Reload settings" just now, it's "Reload styles". Cheers -Terry > I'm not sure which is the simplest thing that could possibly work. On > the one hand, declaring that caching shouldn't happen is a global > constraint. Otoh, adding updateSettings methods for classes that > cache settings is more work. Using updateSettings has the advantage > that it is explicit, so maybe it's better despite the new > infrastructure to call all x.updateSettings. It's a close call, imo. > > EKR > -- 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 post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
