Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » RCP started from IDE much faster than the exported version
RCP started from IDE much faster than the exported version [message #765717] Wed, 14 December 2011 15:12 Go to next message
Peter Kullmann is currently offline Peter Kullmann
Messages: 199
Registered: July 2009
Senior Member
Hi, I'm trying to find out why our rcp application is sometimes slow. After a lot of testing and trying out I could reduce the situation to this:
- The RCP started from the IDE runs fast (or at least not slower than what we are used to)
- When exported using PDE export, the same application runs significantly slower

Some more details:
- I measured the opening of a perspective with a lot of views that are populated with data from a server from the moment of the click to a menu item up to the point where all async data refreshers are done. The fast times are in the range of 3.9 - 4.6 seconds and the slow times are in 8.5 - 10.1 seconds.
- This happens only on Windows XP. On Windows 7 or on MacOSX, the RCP runs fast
- An older version of the application based on eclipse 3.6 runs also fast. The problematic version is based on 3.7.

I compared the system properties, plugin versions, jre versions of the app and did not find anything that was obviously causing the difference in speed. In particular, both instances were running on the same VM and had the same set of bundles with the exception of the ones that were in the IDE in source form.

Has anyone an idea what could cause the difference in speed?

Thanks & regards,
Peter
Re: RCP started from IDE much faster than the exported version [message #768101 is a reply to message #765717] Mon, 19 December 2011 15:20 Go to previous messageGo to next message
Peter Kullmann is currently offline Peter Kullmann
Messages: 199
Registered: July 2009
Senior Member
If I start the slow application (produced by pde export) from the command line with "java -jar plugins/o.e.e.launcher_...jar" it runs fast! Using the launcher makes the app slow apparently. What could that be?

Regards,
Peter
Re: RCP started from IDE much faster than the exported version [message #768740 is a reply to message #768101] Tue, 20 December 2011 17:28 Go to previous message
Peter Kullmann is currently offline Peter Kullmann
Messages: 199
Registered: July 2009
Senior Member
We found the problem: The reason lies somewhere with java and/or with log back. Our rcp app is using logback and was configured to log into some files and also to the console (mainly because it's useful in the IDE). If the app is started with java in a console or in the IDE logging goes to the dos box or the console view respectively and runs fast. But if the app is started with javaw (or equivalently with the eclipse launcher) there is no console and logback is behaving terribly. Consider this example:

package testlogback;

import java.io.FileWriter;
import java.io.IOException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Main {
    public static void main(String[] args) throws IOException {
        Logger logger = LoggerFactory
                .getLogger("chapters.introduction.HelloWorld1");
        long start = System.currentTimeMillis();
        for (int i = 0; i < 10000; i++) {
            logger.debug("Hello world.");
        }
        long end = System.currentTimeMillis();

        FileWriter fileWriter = new FileWriter("logbacktest.out");
        fileWriter.write("Time: " + (end - start) + "\n");
        fileWriter.close();
        System.out.println("Time: " + (end - start));
    }
}


On my windows box it prints out "Time: 140" when started as "java -jar testlogback.jar". If I start "javaw -jar testlogback.jar" it uses 100% CPU for about 20 seconds (for effectively doing nothing). This is the case for Sun ire 6 and 7 on windows xp.

On windows 7 the situation is better: javaw uses only about 7 seconds (which is still too much, I guess).

Best regards,
Peter



Previous Topic:Cache Problem when using Xulrunner in Eclipse RCP?
Next Topic:Issue opening text/word document in Eclipse RCP
Goto Forum:
  


Current Time: Tue Sep 02 23:59:35 GMT 2014

Powered by FUDForum. Page generated in 0.02699 seconds