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 boosting
kosta
Hello BIRT community,<br />
<br />
I am using BIRT as API.<br />
Like in the books explained creating and destroying (Platform.<em class='bbc'>startup</em>() and Platform.<em class='bbc'>shutdown</em>()) the platform is taking some time. <br />
Can I avoid this by calling the platform only once and leaving it running in background. :blink: <br />
Any suggestion is welcome.<br />
<br />
Thanks in advance.<br />
Kosta
Find more posts tagged with
Comments
JasonW
You should only startup the platform once. Is your app web based? How are you using the engine?
Take a look at this page:
http://wiki.eclipse.org/Servlet_Example_(BIRT)_2.1
Jason
kosta
Hi Jason,
the project is not a web app.
I am creating the platform and the engine in a POJO like in this example:
http://wiki.eclipse.org/Simple_Execute_(BIRT)_2.1
My idea was to create the platform-object in another class (separating platform and engine) only once and pass to the method where the engine-object is created and destroyed. But I am not sure if this is the best solution.
I saw the example what you have linked. Not only the platform but also the engine are created once. Adding some context to the platform can be done only once, on creation. That means I must add empty container, for the scripted data set, to the platform and then fill them with some method invoking it from the script.
Best Regards,
Kosta
JasonW
Even though the example I posted was web based a similar strategy should be used for a thick client app. Only startup the platform and create the engine once. create a new task for each report you want to run and make sure to close the task when the report is complete.
Jason
kosta
Thank you Jason,
I just saw I can use the getAppContext() not only on EngineConfig (the config object) but also on IRunAndRenderTask (the task object). That was my problem so far. I 'll test that as soon as possible.
Kosta
kosta
Hello Jason,
I know this post is 2 year old but I have a "new" problem.
It's about the "task.run()"-method.
We have tried to use the functionality, which ist implemented as java application, as web service.
Creating the engine takes only the first time few second. After then not, since it's implemented as singleton.
But the "task.run()"-method costs for every request 5 seconds. After the third request we got PerGen Space Errror.
Is there any way to avoid this.
When I am starting the program as java application only the first task.run()-call takes 5 sec.
The others are using only one sec.
Thanks for any suggestions and hints.
JasonW
Kosta,
Are you setting the max perm size parameter on the JVM?
-XX:MaxPermSize=256M
Jason
kosta
Hi Jason,
in my java application I set the -XX:MaxPermSize=256M, even to 512M but setting this has no new effect. The first call takes 5 sec and the calls after that 1 sek and then less then 1 sek. It seems to me that this is kind of the java vm hot spot optimization. I am using the 2.6 version now. Are the newest version of BIRT faster when using the api?
Thanks for any suggestions and hints.
JasonW
I thought you were using 3.7. It should be faster. Can you try it?
Jason