ADF Tip: Custom Excel Export Performance

I’ve been working on my first ADF-project the last couple of months and its time for a first blog post regarding ADF-development. We had the requirement to export data from the new developed ADF-Application to Excel. The standard Excel Export functionality was not sufficient, since also the chosen search criteria and other values should be exported, too.

For that purpose we used the docx4j project, with which the manipulation of excel, word and powerpoint files is possible. To export the data from the view objects to the java class that is responsible for creating the excel, the view object class and the view row class was created on view object level. In the view row class we used following code to export the data of the view object:

ModelUtils.getText(writeXML(1, XMLInterface.XML_OPT_ALL_ROWS));

In the beginning the view object had a Master-Detail-Relationship. When testing the export with a huge amount of data we ran into performance issues. We found out, that the relation was the cause of the bad performance and merged the different view objects into one view object – with that change the performance increased a lot. It seems that ADF evaluates all details and concatenates the resulting XML – and that takes time.

So when you have the requirement to export a lot of data and the standard ADF functionality is not enough, keep in mind that the XML-export could cause performance issues due to a Master-Detail relationship.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s