cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zbordas
Level 3

Slow execution in custom action

We have recently discovered a problem in our update installer and I can’t seem to find a proper workaround. In our update installer we have a special action that performs DB updates. Running the update code outside of IA takes about 40 seconds. However, when I add the same code the a IA custom action and run it inside the installer the execution takes minimum 3 times as much. I cannot seem to find an explanation to this. I spent significant amount of time analyzing the problem and here are my findings:

- The problem is specific to SunOS and Linux platforms. Running the installer on windows performs perfectly.
- The performance difference is unacceptable. At least 3 times (300%) slower using some simple code but it can be even more under certain conditions.
- I played a lot with the VM arguments (JRE version 1.5 and 1.6, heap size, client / server switch etc) none of these seem to have any effect.
- Surprisingly, simply hooking up a debugger to the process seems to eliminate the bottleneck and the code performs just like in standalone mode. I don’t understand why.
- When I profiled the execution using JProfiler it showed that some 50% of the processor time is spent in some system level X11 toolkit thread (see below).
- I tried to disable some of the AWT event handling by pushing my own, no-op event handler to the framework, tried to suspend some AWT threads, increase the local thread’s priority etc. but none of these helped.
- When running the installer in silent mode with or without display set is still running slow.
- Running the same code on a custom panel instead of an action makes no difference in the execution time.

I have attached a simple sample Java code, jar file and install project that shows the problem. If I run the Java code on RE4 it takes about 11 sec. to complete (make sure you have a large (1GB) heap as it only adds elements to a hashmap) while running it inside the custom action it takes about 44 seconds to complete.

Anybody have any idea if there is anything we can do with this on our side? Any help it greatly appreciated.

Zoltan
Labels (1)
0 Kudos
(1) Reply
rghash
Level 2

You are right, if you build a Linux kit with IA-8 using this project it's noticeably slower running in IA than running standalone.

Can anyone with a later version of IA (like 2010) try building a Linux installer using these files and let us know the results?
0 Kudos