[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-report-engine-dev] Caching ExecutionContext?s reportIR object


Iâm sorry to bother you with my letter, but I do not know what channel
I should write.
We would lik to change the BIRT code and we do not know whether this
should be published, and if yes, then how.
But first we want to ask for help, that we are on the right way

Briefly describe the problem

We use BIRT 4.2.0 with Weblogic 12c
We have a singleton ReportEngine, caching the ReportRunnable objects
and create and run RunAndRenderTasks

EngineConfig config = new EngineConfig();
reportEngine = new ReportEngine(config);
IReportRunnable design = reportEngine.openReportDesign(designInputStream);
try {
IRunAndRenderTask task = reportEngine.createRunAndRenderTask(design);
PDFRenderOption options = new PDFRenderOption();
Map appContext = task.getAppContext();
return outputStream.toByteArray();
} catch (EngineException e) {
throw new EJBException(e);
} finally {
try {
} catch (IOException e) {

I looked at the BIRT source and realized that each task running, the
ExecutionContext build a Report (reportIR) object. It seems to me,
this object is a model object and does not change after was built.
(Except Reportâs query map and the corresponding maps. But when these
maps is modified, report object is synchronized)
So, I think the report object could be cached, for performance improvement.
(I cached report object, tests the operation, and it seems to work.
But iâm not sure it is a good solution.)

Is it a useful solution caching the report object?
If not, why?
If yes,:
Is there already a working solution?
Is there some limitation, if we work that? (eg.: the same
ReportRunnable object donât create and run task in multiple thread)
If no such solution, and we work out this, how we publish the source?
(We have to publish or not?)

Thanks in advance!
Attila Molnar