Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Performance degradation when upgrading from Birt 2.3 to 2.6
vivash
Hi,<br />
<br />
We recently started upgrading our reports (50 of them) from Birt 2.3 to 2.6. We'd to make quite a few changes (especially as we use lot of Java classes in our javascript code), which in 2.6 causes lots of ambiguity problems. Now, the main problem we see is the performance. Lots of our reports use Birt's Java APIs to change the report design at run-time and that's where we see the performance issues. The same thing which took 5 sec in Birt 2.3 is now taking over 30sec in 2.6. <br />
<br />
Is there any known issue of using Java API to design report in 2.6? Any performance related I should know for 2.6?<br />
<br />
Here is some of the code snippet,<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
//get a reference to the ElementFactory
reportDesignHandle = reportContext.getReportRunnable().designHandle.getDesignHandle();
elementFactory = reportDesignHandle.getElementFactory();
//create a new table with as many columns as selected fields
fTable = elementFactory.newTableItem("dataTable", columns.size());
fTable .setProperty( IStyleModel.TEXT_ALIGN_PROP,DesignChoiceConstants.TEXT_ALIGN_LEFT );
fTable .setWidth("100%");
fTable .setProperty( IReportItemModel.DATA_SET_PROP, "data" );
tableHeader = fTable.getHeader().get(0);
//tableHeader.setProperty(StyleHandle.BACKGROUND_COLOR_PROP, "#0099FF");
computedSet = fTable.getColumnBindings();
//RowHandle
detail = fTable.getDetail().get(0);
..
..
tcell1 = detail.getCells().get(i);
data = elementFactory.newDataItem(null);
data.setResultSetColumn("\"" + fieldName + "\"");
tcell1.getContent().add(data);
setElementBorder(tcell1);
</pre>
<br />
Thanks,<br />
-vivek
Find more posts tagged with
Comments
JasonW
Vivek,
Can you try the attached report. It may be that you are not supplying the table bindings. Look at the code in the example.
Jason
JasonW
Forgot the attachment
vivash
Thanks Jason for the response. My report does work - it just takes longer in Birt 2.6. I do have data set and output columns defined in the report. I use the same column bindings in the script to populate them,<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
fTable = elementFactory.newTableItem("fDataTable", columns.size());
fTable.setProperty( IStyleModel.TEXT_ALIGN_PROP,DesignChoiceConstants.TEXT_ALIGN_LEFT );
fTable.setWidth("100%");
fTable.setProperty( IReportItemModel.DATA_SET_PROP, "FDataSet" );
computedSet = fTable.getColumnBindings();
detail = fTable.getDetail().get(0);
colIter = columns.keySet().iterator();
.. and then iterate through columns to populate them
</pre>
<br />
I see fetching the data from scripted data set is taking way too long now - every row fetch is taking almost a second. The result itself comes fast from the back-end (comes as List of Map and fetch uses iterator to get each row) , but setting all the fields in the fetch operation of the dataset is taking long. Is there any changed in how scripted data set needs to be used in Birt 2.5/2.6 compared to Birt 2.3?<br />
<br />
Thanks,<br />
-vivek
JasonW
I am using BIRT 2.6 to run the report I attached and I did not notice any difference between 2.5. and 2.6. Did you try that test report?
Jason
vivash
Hello Jason,
yeak, the test report runs fine. I think my problem is using scripted data source - not sure why is it taking so much longer in Birt 2.6 when the same code ran 10 times faster in Birt 2.3.
Any other ideas?
-vivek
JasonW
Is there any way I can run your report?
Jason
vivash
Jason,
I may have to re-work the report a little to run stand-alone. Currently, it heavily depends on our back-end. In any case, I've noticed that the slowness seems to be only for the first run, i.e, if I restart my application (app server) and then run the report, the report generation is slow, but for subsequent runs the report generation is fast (or atleast comparable to previous builds). We didn't have this problem in Birt 2.3 - it always used to take the same amount of time to run. Can we have that behavior if not faster every time?
Is there new caching mechanism in Birt after Birt 2.3 release? Any configuration changes that can be made to have reports run faster even for the first run?
Thanks,
-vivek
JasonW
The first time BIRT runs a report it is always slower as the engine has to crank up OSGi. This was also the case in BIRT 2.3.2. I do not notice any difference between the two in my installation, but you can open a bug entry to possibly prestart the engine.
Jason
vivash
bug opened,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=324350