launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #05002
Re: Performance Tuesday: enhancement; analysis; questions
Hi Mr lifeless
>>
>> *Questions*
>>
>> a. Should the property caching infrastructure be made smarter so that
>> for a given view rendering cycle, each domain object representation only
>> uses a single cache instance?
>
> It already does; you probably have two domain object instances, not
> one instance with two caches. There are a few ways this could occur;
> what particular object and cached attribute are you looking at? (so
> that I can look at the code).
>
Since you asked...
The driver for what's loaded is the page template - person-branches.pt
Here's a snippet:
<div style="float:right" id="floating-links"
tal:define="menu context/menu:branches">
<div tal:define="link menu/addbranch"
tal:condition="link/enabled"
tal:content="structure link/render" />
</div>
<tal:summary replace="structure context/@@+codesummary"/>
One instance of PersonBranchesMenu (from code.browser.branchlisting.py)
is created due to tal:define="menu context/menu:branches" and the other
comes from the macro @@+codesummary (ieperson-codesummary.pt) which also
has the same tal:define. These menu objects are for the same underlying
data but two separate runtime instances (with different object ids) of
PersonBranchesMenu are created, one for each tal:define. And each of
these instances has a separate property cache.
I'll followup on your other suggestions, and also read the link sent by
mwhudson - the discussion pre-dates my join date by a mere 5 days :-)
Thanks for the input. I'm still learning the finer detail of how zope
infrastructure works so forgive me if my questions seem elementary
sometimes :-)
Follow ups
References