Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24

    Memory leak on Firefox only

    Hi there,

    I'm running Lightstreamer to push high-frequency data, which is updated per second, to browsers. I'm using the LS Javascript library to get the messages from the LS server.

    To measure the browser memory usage, I ran my web page in Firefox 3(FF3) and IE7 for a few hours. I noticed the commit memory for IE7 was quite stable over the time. But the commit memory for FF3 has been increasing throughout. The Resource Monitor on Vista showed FF3 incremented about 100KB memory per second. If I stopped the Lightstreamer server, hence there is no message to the browser, the memory increase also stopped.

    To isolate the issue, I turned off other javascript code. I also commented out "pushTable.onItemUpdate = myUpdateItem;" so that there is no handler to process the LS messages. But FF3 continues to increment the memory consumption as messages are pushed from the server.

    Here are some memory data I collected for FF3 and IE7. It seems IE7 is doing OK.

    Right after opening the webpage: 130MB(FF3) 142MB(IE7)
    Running for 2 hour 40 mins: 255MB(FF3) 148MB(IE7)
    Running for 3 hour 20 mins: 273MB(FF3) 148MB(IE7)


    Can anyone please advise?

    Thanks,
    Richard

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Hi Richard,

    Do you have Firebug installed? It is usually the cause of growing memory. If you have it, try told completely disable it (not just suspend it).
    Please let us know.

    Cheers,
    Alessandro

  3. #3
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24
    Hi Alessandro,

    I disabled Firebug, but I was still seeing the memory increase in Firefox.

    I'll try to remove Firebug completely, then re-do my memory measurement. I'll report back soon.

    Thanks for your help.

    Richard

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Hi Richard,

    We did a new test with a freshly installed Firefox 3. I confirm we cannot observe any permanent memory growth.
    Do you nave any news on your side?

    Thanks, cheers,

    Alessandro

  5. #5
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24
    Hi Alessandro,

    Thanks for your follow up. We've been very busy in the past month trying to implement some new features. Sorry for replying back late.

    I still observe memory issue, but it's hard to isolate which part of the Javascript code is causing it since our app is quite complex. Nonetheless, it's very reassuring to know that your test confirms there is no permanent memory leak in FF3. Our app is moving towards the "one-page" model, therefore even "pseudo" memory leaks, which require user to reload the web page to reclaim memory, should best be avoided. Do you observe such "pseudo" memory leaks in FF or IE?

    Regards,
    Richard

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Hi Richard,

    No pseudo-memory leaks due to Lightstreamer have been observed on FF or IE. In our tests, we have kept a streaming page open for days, without any reloads, and no memory growth has been observed on both IE and FF.

    Cheers,
    Alessandro

  7. #7
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24
    Hi Alessandro,

    That's good to know. Thanks so much.

    Richard

  8. #8
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24
    Hi Alessandro,

    We are still seeing severe memory issue with our web app. If we left our app running for 24 hours, the browser (FF and IE) memory usage goes up to 1.2 GB.

    To debug the memory issue, I made a few simplification to our app.

    1. The LS server pushes out 200K data per second. This exacerbates the memory issue and make it more visible quicker.
    2. The web app only receives the data, but not consume the data. I set table.onItemUpdate to an empty function that does nothing. This eliminates the possibility of other parts of the web app keeping references to the streamed data.

    After running Firefox 3 for 30 minutes, the browser memory usage goes from 300MB to 700MB. I do have Firebug installed on the Firefox. I'm going to try IE to see how much memory it consumes.

    Can you please help?

    Thanks,
    Richard

  9. #9
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Hi Richard,

    It is important to see what happens with that test case with Firebug disabled or on IE.
    Please, let us know.

    Also, may you provide us with your test code or environment, so that we can try to replicate it?

    Cheers
    Alessandro

  10. #10
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24
    Hi Alessandro,

    My IE test shows that the browser memory does not increase over time. After I disabled Firebug, Firefox memory does not increase dramatically either.

    It seems Firebug does cause serious memory leak on Firefox. I think I would show a popup to ask users to disable Firebug if the Javascript detects user's browser has Firebug installed.

    Thanks,
    Richard

 

 

Similar Threads

  1. Memory Leaks
    By igindex in forum Client APIs
    Replies: 1
    Last Post: November 11th, 2006, 10:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 08:33 AM.