Posted Aug 28, 2009
Content editing and creation in Plone is faster with archetypes.schematuning
Some bench marks of content editing and creation in Plone with and without archetypes.schematuning installed.
Background
For about the past week I have been working on batch creation of Faculty Staff Directory people for a Plone site that WebLion will soon be hosting. The site is currently Plone 2.1 and the Faculty Staff Directory is a MS-SQL db with PHPParser making the queries. These tables have been dumped to csv files, massaged slightly and then processed and combined with python to extract the data and create objects which are sent via xml-rpc to a Plone site for creation or update. Things had been running 'fast enough' but did start to slow down yesterday when I started to update the Person objects with relationships to the person's specialty. Erik Rose had mentioned archetypes.schematuning yesterday and the speed up he had seen in another site, so I thought I would give it a try.
Test Environment
Here is an overview of the system I am working on and some numbers that I observed.
The records were updated in one request to the wsapi4plone.core XML-RPC webservice using wsapi4plone.client and wsapi4plone.webslinger to pre-process the data before sending any requests.
Environment in which these benchmarks were made:
- RHEL 5.3 32-bit running in VMWare Fusion. 1 virtual CPU, 1GB RAM.
- Python 2.4.3
- Plone 3.2 from Buildout
Packages Installed for Plone
| Package | Version | URL |
|---|---|---|
| wsapi4plone.core | 0.1a3 | http://pypi.python.org/pypi/wsapi4plone.core |
| Products.FacultyStaffDirectory | 2.1.1.2 | http://pypi.python.org/pypi/Products.FacultyStaffDirectory/2.1.1.2 |
| BioPersonExtender | 1.1d1 | https://weblion.psu.edu/svn/weblion/biologyDepartment/BioPersonExtender/trunk/ |
| archetypes.schematuning | 1.1 | http://pypi.python.org/pypi/archetypes.schematuning/1.1 |
Benchmark Times for the Creation or Update of 244 FSDPerson Records
| schematuning installed | Create/Update | TIME(HH:MM:SS) | Records per Second | Seconds per Records |
|---|---|---|---|---|
| FALSE | Create | 00:22:24 | 0.18 | 5.51 |
| FALSE | Update | 00:04:26 | 1.09 | 0.92 |
| TRUE | Create | 00:04:29 | 0.91 | 1.10 |
| TRUE | Update | 00:01:03 | 2.87 | 0.25 |

With schemaextender?
I'm curious to know if these benchmarks were performed with schemaextender available in the instance. Looking at the code it seems strange that the patches would offer much performance improvement to stock Archetypes schema lookup.
Alec Mitchell