On Mon, Aug 24, 2015 at 9:38 AM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:

> On Mon, 24 Aug 2015 09:21:36 -0500
> "Edward K. Ream" <edream...@gmail.com> wrote:
>
> I was really only referring to Reload settings to see appearance
> changes, which I think should work.  I thought it used to work,
> although checkout some old revisions didn't hit a point where it did.
> Maybe it's just not rebuilding / re-applying the stylesheet when it
> should.
>
> Certainly a lot of classes cache settings, I've done it often enough
> when I'm concerned that the code is heavily used in UI updates etc. and
> self.some_int seems faster than self.c.config.getInt('some_int'),
> although in reality the difference may not be important.
>

​I ran timeit awhile back on c.config.getSomething ​and the results
indicate that there is no need, as far as *time itself* is concerned ever
to cache any settings.

Iirc, I investigated removing all caching by searching for something like
"= c.config.get".  There were lots of hits, but not thousands :-)

I am going to get back into programming Leo fairly soon, and this is
something that should a) be only a few hours work and b) be surprisingly
useful.

I probably should be the one to do this: there are a few wrinkles,
including some "official" commander ivars, like c.tabWidth, that are
presently cached and that may have to be re-thought.

Anyway, imo 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.

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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to