In a separate Fedora project, we discovered that using versioning slowed down the retrieval process, especially if the control group for the versioned datastream is X (internally managed XML). If it is
taking 16 seconds for checkExists to complete and you have updated the object many times with versioning on, you might want to weigh the advantages of versioning against the performance enhancement of having versioning turned off. You can also get a performance boost by using control group M (managed content) for XML content instead of X (internally managed XML).
For any who may not be familiar with how Fedora stores datastreams, the reason this happens is that the object foxml holds the metadata for each datastream version. In the case of internally managed XML, the object foxml also holds the XML value of each datastream version. The object foxml can grow quite large if there have been lots of updates to an internally managed XML datastream.
[mailto:firstname.lastname@example.org] On Behalf Of Ford, Kevin
Sent: Monday, April 16, 2007 12:52 PM
Subject: [Fez-users] checkExists
I wanted to share some wisdom about something I just completed working through this morning. This has to do with the time it takes for the page to render when viewing an item in a collection.
Last week I started implementing VRA Core 4 with
Trawling through the code to see precisely where the time sink was (my hunch was it had to do with dealing the VRA Core XSD and XML datastream), I discovered the multiple calls to the record->checkExists function from the view2.php and class.record.php page (within the getXmlDisplayId function). Placing checks throughout the code, I noted that every time the checkExists function was called it took about 16 seconds for the function to return a result.
So, I created an additional variable for the RecordGeneral class to store the result of the checkExists function, still called once at the top of view2.php (variable holding the result after that). It still takes 16 or so seconds to receive the result from the first (and only) call to checkExists, but the page completes rendering 3 seconds after that initial call to checkExists, in 19 seconds.
Clearly, this is not (necessarily) a typical example. Like I said, an object with a simple DC record renders much, much quicker. Nevertheless, it seems that the multiple calls to checkExists are unnecessary and negatively impact performance (by more than 30 seconds in this example).
Also, providing there is a PID (and the record exists), a RecordObject is created twice in view2.php.
Hope this may help,
Digital Services Specialist
Tel: 312 344 8568