Ticket #9579 (closed PLIP: wontfix)
Cache Archetypes Schema lookups
Reported by: | dukebody | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.0 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
http://plone.org/products/plone/roadmap/251
The Schema method of BaseObject is looked up several times per request for every object taking part in the request. This method is very heavy and leads to performance problems. Caching solves the problem.
Proposed by
Hedley Roos
Seconded by
Jens Klein
Proposal type
Architecture
Repository branch
trunk
State
being-discussed
Motivation
The Schema method of BaseObject is looked up several times per request for every object taking part in the request. This method is very heavy and leads to performance problems. Caching solves the problem.
Proposal
http://pypi.python.org/pypi/archetypes.schematuning needs to be ported to Archetypes itself.
Deliverables
Updated unit tests for Archetypes are already part of archetypes.schematuning (see pypi or svn)
Risks
Third party applications which modify the schema of a content type in code run the risk of being returned an old schema in subsequent calls. A method is provided to invalidate a schema in these cases. The applications would need to be modified.
Applications making use of the _updateSchema from BaseObject will continue to work.
Progress log
[2009-01-23] release of archetypes.schematuning 1.1 (jensens)
Participants
Hedley Roos, Jens Klein
An updated version of this PLIP, #9376, was discussed by the Plone 4 framework team and rejected since it's more appropriate for the the caching to be in archetypes.schemaextender rather than in Archetypes itself. witsch has since added some caching to archetypes.schemaextender.