Applet uses more and more CPU.

Discussion in 'Java' started by AW på ZRX, Sep 11, 2006.

  1. AW på ZRX

    AW på ZRX Guest

    Hi



    I have a JApplet running in IE 6.0 with the java 1.5 plugin.

    Over time the applet uses more and more CPU. It starts with small peaks, and
    then the peaks gets more and more frequent, finally raising the CPU level to
    a 100% causing the applet not to respond. It happens over a period of 24 -
    48 hours.



    The applet is a GUI, talking to a server using messagequeing (IBM MQ series)
    and communicates with the browser using JSObject. Apart form this there are
    no connections to the "world outside".



    Using a java profiling tool (OptimizeIt) I have found that it's the main
    thread that uses the CPU. However I can not see what the main thread is
    doing (no information avaliable in OptimizeIt).

    I don't understand this. The main thread should run when the applet starts,
    and then do nothing (an I wrong here?), as the rest of the execution is made
    on the AWT-Eventthread, and some other threads which I create myself. The
    threads which I have created myself all behave like expected.



    Has anybody got any ideas about what the main thread could be doing ?



    Allan
    AW på ZRX, Sep 11, 2006
    #1
    1. Advertising

  2. AW på ZRX wrote:
    ....
    (applet)
    > Has anybody got any ideas about what the main thread could be doing ?


    Have you tried raising the trace level of the
    output in the Java console in your browser?

    Trace level '5' might provide more information.

    Andrew T.
    Andrew Thompson, Sep 11, 2006
    #2
    1. Advertising

  3. AW på ZRX

    AW på ZRX Guest


    > Have you tried raising the trace level of the
    > ouput in the Java console in your browser?


    > Trace level '5' might provide more information.


    There are no messages even with level 5. (Of cause there are some messages
    when the Applet starts, but while runing normally there are no messages.)

    Allan
    AW på ZRX, Sep 11, 2006
    #3
  4. "AW på ZRX" <allan@fjern_malwis.dk> burped up warm pablum in
    news:45052950$0$4155$:

    > Over time the applet uses more and more CPU. It starts with small peaks,


    and
    > then the peaks gets more and more frequent, finally raising the CPU

    level to
    > a 100% causing the applet not to respond. It happens over a period of 24


    -
    > 48 hours.


    Could there be a memory leak causing the GC to go wild?

    --
    Sincerely,

    Tris Orendorff
    [Q: What kind of modem did Jimi Hendrix use?
    A: A purple Hayes.]
    Tris Orendorff, Sep 13, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alberto Rocha
    Replies:
    0
    Views:
    480
    Alberto Rocha
    Apr 30, 2004
  2. pavunkumar

    How , system cpu and user cpu times calculates

    pavunkumar, Feb 27, 2009, in forum: C Programming
    Replies:
    1
    Views:
    348
  3. inho yi

    aspnet_wp uses up 98~99% of CPU power

    inho yi, Jan 8, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    105
    Dino Chiesa [Microsoft]
    Jan 8, 2004
  4. Ed McNierney

    ServerXMLHTTP uses 100% CPU for a long time

    Ed McNierney, Dec 2, 2005, in forum: ASP General
    Replies:
    7
    Views:
    199
    Bob Barrows [MVP]
    Dec 3, 2005
  5. DanWeaver
    Replies:
    0
    Views:
    101
    DanWeaver
    May 17, 2007
Loading...

Share This Page