Dexterity vs. Archetypes

TL;DR: migrating your Archetypes content to Dexterity shrinks your Data.fs considerably!

I’ve started looking into migrating Archetypes content in one of the sites we’re running to Dexterity. But before I started coding I wanted to make sure that the juice is worth the squeeze.

The site contains roughly 130k content objects. Most of them are default Plone File type, with a few additional string fields (added with archetypes.schemaextender) and a custom workflow. Nothing fancy, just your standard integration project. New content is imported into the site in batches of ~10k items every now and then with the help of the awesome collective.transmogrifier.

To test how Dexterity compares to Archetypes for our use-case I first created a new Dexterity type that matched the feature-set of the Archetypes type. Then I created a fresh instance, used Transmogrifier to import 13k items (10% of our production data) and ran some numbers.

Results are pretty amazing. With Archetypes, an import of 13k items into a fresh Plone 4.2 site took 61 minutes and the resulting Data.fs had 144 MB (details). With Dexterity, the same import took only 18 minutes and the resulting Data.fs had 64 MB (details). That’s a whopping 70% decrease in import time and a 55% decrease in Data.fs size!

More than enough to be a valid reason to invest in rewriting our types and write that migration script.

Neyts Zupan

Neyts is the Digital Overlord of Niteo, poking his nose into any and all technical things.

See other posts »