Ticket #9672 (closed Bug: fixed)
portal factory causes zodb writes ( compounded by kss )
| Reported by: | hazmat | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 3.x |
| Component: | Infrastructure | Keywords: | patch |
| Cc: | hannosch, esteele, hazmat, lucmult, cleber_jsantos, amleczko, gotcha |
Description
Content created in a portal factory generates spurious writes to portal and reference catalogs. Moreover with KSS inline validation enabled (default), these spurious writes happen everytime a user tabs through fields in a form. Also as these spurious writes are to centralized application hotspots, this behavior greatly increases the probability of WriteConflictErrors.
Packing removes these, but clearly Plone should never be writing to the database for portal factory content.
I came upon this issue, while digging through an application where the data.fs has grown to large for packing in reasonable time, and found approximately 25% of the zodb transactions are due to portal_factory writes.
I think the appropriate solution is to make archetypes portal factory aware, and to shortcircuit indexing methods (indexObject) and Referenceable.manage_afterAdd if the content is portal factory contained... ie. aq_parent( object ).class.name == 'TempFolder'