#1: ATPhoto / ATImage
- Proposed by
- Jean Francois Roche
- Seconded by
- Russ Ferriday
- Proposal type
- Architecture
- Assigned to release
- State
- in-progress
Motivation
EXIF causes excessive memory consumption while viewing folders containing a large number of images, because each tag parsed from an image file generates a separate object. This is documented in the Collector issue 4716. The fix has relatively low risk, and has minimal impact.
Part of the vision of PM is to improve the options for uploading, downloading, and displaying images. The features from ZPhotoSlides complement the capabilites of other Multimedia content and will attract a wider audience to Plone.
Proposal
Modify the EXIF module used only by ATContentTypes to prevent excessive memory consumption. This requires changing the return type to a dictionary, and forces minor changes to the consumers.
Second part:
There are two alternative approaches:
- create a new ATPhoto type as part of PloneMultimedia. This is attractive for ease of development and simplicity of delivery. Dependency on ATContentTypes developers will be reduced, and ATPhoto's dependencies will be satisfied within the PloneMultimedia Product.
- rather than creating a new type, extend ATImage with the features of ZPhotoSlides. This complicates development, requiring more interaction with the ATCT team.
Implementation
Two phases...
Phase one
- create a bug fix branch of ATCT.
- extend the archGenXML model to include tests to
- exercise the EXIF interface, and validate the tests
- demonstrate the memory consumption of EXIF
- modify EXIF.py to put return data into a dictionary
- modify the three places that EXIF is used within ATCT to handle the new return type
- run the tests and ensure that the interface changes are benign
- modify EXIF.py to reduce mem consumption
Phase two (in nothing like as much detail ;)
- define an interface for the functionality we will bring from ZPhotoSlides
- develop ATPhoto, ATPhotoAlbum as subclasses of ATMediaFile which among other things will provide Metadata services.
- merge the above types into the PM Product
When we have proved the ATPhoto functionality, we will entertain moving the functionality into ATImage for optional activation, but look at the comments in Risks about Five dependencies.
Deliverables
- Updated model and tests in ATImage
- ATPhoto and associated classes in PM
Risks
Also in two installments...
First part
minimal risk, easily testable, tests part of deliverables
Second part
this a new feature addition. Much of the code has been proven over several years by Jean Francois. At the same time, we are using Five features, adaptors, and some new concepts. We must be compatible with other parts of PM.
Our dependency on Five limits means we can only move the new features into ATCT until after ATCT supports Five.
Participants
Jean Francois - lead
Alain Meurant
Russ Ferriday
others in the PM team
ATPhotoAlbum
yes its the ATPhotoAlbum, a container for ATPhoto
container...
Regarding the "container" thats mentioned in the plip. I'm pretty sure this was meant to mean, a photo container which is a photo album... and not a container for photo album's.