If you are developing multiple forms / fragments inside your application whereby some forms look similar, a common way is then to copy some XDP-files at some point to make specific changes to these forms. What most developers don’t realize is that doing a copy on the OS (not doing a Save As in Designer) could have major performance impact while rendering forms.
To better understand why this is, you have to go into the details of the caching mechanism used by forms and output.
If you want to know more on this, please read this document. In most cases the filename and path are used to determine the cache key, when this is not available (e.g. template is passed in by value), the caching is based on the following metadata line inside your XDP :
<xdp:xdp xmlns:xdp=”http://ns.adobe.com/xdp/” timeStamp=”2010-12-01T14:00:26Z” uuid=”324b5d64-7aff-4beb-88a5-3ded2dde1819″>
Based on the combination of “timeStamp” and “uuid” it is determined whether the form is already cached or not. This seems to be very straightforward, you would think. However, where you have copied XDP-files, you have the following situation
<xdp:xdp xmlns:xdp=”http://ns.adobe.com/xdp/” timeStamp=”2011-05-05T16:00:10Z” uuid=”324b5d64-7aff-4beb-88a5-3ded2dde1819″>
<xdp:xdp xmlns:xdp=”http://ns.adobe.com/xdp/” timeStamp=”2011-05-05T15:59:35Z” uuid=”324b5d64-7aff-4beb-88a5-3ded2dde1819″>
When you render File1.xdp and File2.xdp one after the other, Forms and Output assume that the XDP has been changed and therefore the cache need to be rebuilt. Functionally you won’t see a difference, but performance-wise you will see a lot of expensive operations because the cache gets constantly invalidated.
A way to see this is to use JMX whereby you expect invocation-times that are constant, when the cache is invalidated you will see spikes in the timings on these operations.
How to get an unique uuid?
Basically you have two ways to renew your uuid with Forms Designer.
If you use File->Save As, Designer will automatically assign a new uuid to your XDP-file
2. Remove uuid
If you go into the xml source of Designer, remove the uuid attribute and save the XDP file, Designer will assign a new uuid.
Checking on shared uuids
We have created an ANT script that helps you to identify XDP-files that share the same uuid. The tool inspects all XDP-files and compares the uuids used. When it finds XDP-files with the same uuid, an error is printed.
You can see an example of that here :
[echo] Checking UUIDs ...
[java] ERROR: Found duplicate uuid 324b5d64-7aff-4beb-88a5-3ded2dde1819 in
File1.xdp and File2.xdp
In the README.txt inside the uuidchecker.zip you will find a brief explanation on how to use this tool.
Original article at http://blogs.adobe.com/livecycle/2011/05/copying-xdp-files-and-the-impact-on-performance.html.