Re: JRebel initially very slow

From: Marc Guenther (yod..chli.ch)
Date: Sun Aug 29 2010 - 10:12:37 UTC

  • Next message: Ricardo J. Parada: "Package name displaying hierarchically instead of flat in WOLips 6"

    Hi Q,

    On 28.08.2010, at 23:59, Q wrote:
    > On 28/08/2010, at 11:06 PM, Marc Guenther wrote:
    >> App startup changed from 9sec to 63sec. I think I _could_ live with that, but every click is now also very slow, at least for new pages. What usually takes 2secs (for a slow page) now easily takes 20s.
    >
    > While I do notice a slow down, I don't notice anything of this magnitude.

    That's good to hear.

    > Do you have a massive classpath that causes a huge number of classes to be loaded on "slow pages"?

    Not at all. I just checked this again. Every click which leads to a new page takes about 10s or more, and in some of those the jrebel log says it intrumented only one class (the page component itself). It's never more than a couple of classes.

    These pages are all <1sec without jrebel.

    >> This only happens on new pages, though, clicks to pages that have been used already are as fast as ever (so once I am where I need to be in my app, its fast, and it works quite nicely).
    >>
    >> So I suspect it is something to do with the classloader, and jrebel instrumenting all new classes, or whatever it does. I checked with -Drebel.log=true that it is only instrumenting our own classes, and not the whole of Webobjects. The output of -Drebel.log.perf=true doesn't really tell me anything.
    >
    > It may be best to contact zeroturnaround directly about this so that they can look at issue. I have dealt with them directly on several occasions and they have been very helpful. JR does make classloading slower, and adds a small overhead to runtime execution, but unless your are loading a lot of classes it shouldn't be unusably slow.

    During app startup, jrebel instruments 637 classes (about half of these are inner classes for the erxkeys in our eogenerated _ classes). First login instruments 33 more classes. From then on it's only 1-5 classes per click.

    >> I'm using the most recent jrebel 3.1.2a. I'm on MacOSX 10.6, Java 1.5, Eclipse 3.6 and WOLips 3.6.6116, using WO 5.4.3 (no Wonder)
    >
    > How exactly are you using 1.5 on OSX 10.6? It only ships with and supports 1.6.

    Ah, does it :)

    I remember that at some point while still on Leopard, Apple decided to silently remove my Java 1.5 installation. So I had to reinstall it manually from the JavaForMacOSX10.5Update6.dmg. I did the same when I installed SnowLeopard and so far it worked without any problems.

    (That was also the point that I decided to stop installing any Software Updates from Apple.)

    Well, anyway, I just tried it with Java 1.6, and it shows the same behaviour.

    >> Is this a problem with my setup, or is it so slow for everybody?
    >
    > Is this issue limited to the one application? In general it shouldn't be that slow unless your application is huge.

    I have only that WO application ;) Well, actually it's a bundle of 6, but it happens for all of them.

    I will try to setup a test example application and check this.

    > One thing I forgot to ask. Does this "slow page" happen to be the first time you fetch from your model(s)? The initial model load and connection setup to the db can add a noticeable delay because it triggers a large number of classes to be loaded.

    No, model loading and everything already happened at startup.

    I'm contacting jrebel support now, and let you know what they say.

    Thanks,
    Marc



    This archive was generated by hypermail 2.0.0 : Sun Aug 29 2010 - 10:13:16 UTC