Hi there,
while working on my RDBMS storage for Archetypes we came across the fact
that content creation using "zopectl run" + the following script
for i in range(0, 10):
somefolder.invokeFactory('Document', id=str(i)
transaction.commit()
is about 4-5 times slower using at.schemaextender compared to a stock
Plone installation. This is even true for the case where we were using
the following document extender basically doing nothing:
class DocumentExtender(object):
adapts(IATDocument)
implements(ISchemaModifier)
own_fields = ('text',)
def __init__(self, context):
self.context = context
def fiddle(self, schema):
return
A profile reveals some insane high number (20k to 60k) of repetitve
calls (addField, checkPropertyDupe, visitImplements etc.). Is there
something broken-by-design in at.schemaextender or still space for
optimizations? At least with the current situation using
archetypes.schemaextender is appearently a NO-GO for larger Plone sites.
Thoughts?
Andreas
10.4590649605
11 566428 function calls (530452 primitive calls) in 2.239
CPU seconds
12
13 Ordered by: cumulative time
14 List reduced from 693 to 500 due to restriction <500>
15
16 ncalls tottime percall cumtime percall filename:lineno(function)
17 1 0.000 0.000 2.239 2.239 bench.py:19(bench)
18 9 0.000 0.000 2.006 0.223
constraintypes.py:268(invokeFactory)
19 9 0.000 0.000 1.991 0.221
PortalFolder.py:305(invokeFactory)
20 9 0.000 0.000 1.991 0.221
TypesTool.py:700(constructContent)
21 9 0.000 0.000 1.991 0.221
TypesTool.py:267(constructInstance)
22 1098 0.008 0.000 1.619 0.001 BaseObject.py:825(Schema)
23 1593 0.006 0.000 1.612 0.001 hooks.py:94(adapter_hook)
24 1098 0.018 0.000 1.606 0.001
extender.py:95(instanceSchemaFactory)
25 1098 0.038 0.000 1.551 0.001 __init__.py:682(__add__)
26 20898 0.101 0.000 1.486 0.000 __init__.py:180(addField)
27 54 0.001 0.000 1.407 0.026
ZCatalog.py:521(catalog_object)
28 54 0.003 0.000 1.406 0.026
Catalog.py:313(catalogObject)
29 20898 0.169 0.000 1.369 0.000
__init__.py:189(_validateOnAdd)
30 36 0.001 0.000 1.355 0.038
CatalogTool.py:365(catalog_object)
120 342 0.001 0.000 0.039 0.000
_api.py:107(queryMultiAdapter)
121 342 0.001 0.000 0.038 0.000
registry.py:215(queryMultiAdapter)
122 342 0.003 0.000 0.037 0.000
adapter.py:477(queryMultiAdapter)
123 28944/22545 0.033 0.000 0.033 0.000
_InterfaceClass.py:88(extends)
124 18 0.000 0.000 0.033 0.002
ClassGen.py:59(generatedEditAccessor)
125 9 0.000 0.000 0.033 0.004
Referenceable.py:184(_updateCatalog)
126 22536 0.033 0.000 0.033 0.000 _object.py:49(isInstance)
127 252 0.001 0.000 0.030 0.000 meta.py:75(field_value)
128 252 0.003 0.000 0.029 0.000 Field.py:1361(get)
129 1080 0.022 0.000 0.028 0.000 utils.py:89(getToolByName)
130 2196 0.008 0.000 0.028 0.000 __init__.py:678(__init__)
131 18 0.000 0.000 0.028 0.002
CatalogTool.py:153(sortable_title)
132 18 0.000 0.000 0.027 0.002
ExtensibleMetadata.py:493(setModificationDate)
133 9 0.000 0.000 0.026 0.003
DCWorkflow.py:342(notifyCreated)
134 9 0.000 0.000 0.026 0.003
DCWorkflow.py:421(_changeStateOf)
135 9 0.001 0.000 0.026 0.003
DCWorkflow.py:446(_executeTransition)
136 45 0.000 0.000 0.025 0.001 __init__.py:32(store)
137 9 0.000 0.000 0.024 0.003 document.py:150(setText)
138 18 0.002 0.000 0.024 0.001
__init__.py:316(initializeLayers)
139 45 0.000 0.000 0.023 0.001
meta.py:80(field_value_set)
140 45 0.001 0.000 0.022 0.000 Field.py:1004(set)
141 12674 0.019 0.000 0.021 0.000
serialize.py:184(persistent_id)
142 45 0.001 0.000 0.019 0.000
ZCatalog.py:654(searchResults)
143 126 0.003 0.000 0.018 0.000 BaseUnit.py:44(update)
144 45 0.000 0.000 0.018 0.000
Catalog.py:720(searchResults)
145 9 0.000 0.000 0.017 0.002
CatalogMultiplex.py:46(reindexObjectSecurity)
146 297 0.005 0.000 0.017 0.000
BaseObject.py:572(getCharset)
147 63 0.000 0.000 0.016 0.000
CMFCatalogAware.py:277(dispatchToOpaqueItems)
148 63 0.000 0.000 0.016 0.000 Field.py:1398(getBaseUnit)
149 63 0.000 0.000 0.016 0.000
CMFCatalogAware.py:191(opaqueValues)
150 45 0.001 0.000 0.016 0.000
Field.py:1266(_process_input)
151 63 0.006 0.000 0.016 0.000
CMFCatalogAware.py:154(opaqueItems)
152 9 0.000 0.000 0.015 0.002
DCWorkflow.py:376(updateRoleMappingsFor)
153 9 0.000 0.000 0.015 0.002
BaseFolder.py:251(Description)
154 3510 0.014 0.000 0.015 0.000
registry.py:225(getAdapters)
155 302 0.006 0.000 0.015 0.000 FileStorage.py:631(store)
156 9 0.000 0.000 0.014 0.002
ExtensibleMetadata.py:482(notifyModified)
157 45 0.002 0.000 0.014 0.000 Catalog.py:442(search)
158 90 0.000 0.000 0.014 0.000 Field.py:1263(_make_file)
159 45 0.000 0.000 0.014 0.000
utils.py:50(modifyRolesForPermission)
160 45 0.000 0.000 0.014 0.000
TransformEngine.py:313(_findPath)
161 9 0.000 0.000 0.014 0.002
ExtensibleMetadata.py:505(setCreationDate)
162 792 0.005 0.000 0.014 0.000 Field.py:702(get)
163 90 0.000 0.000 0.014 0.000 BaseUnit.py:32(__init__)
164 567/45 0.008 0.000 0.013 0.000
TransformEngine.py:335(_getPaths)
--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [email protected] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[email protected]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers