Client (Browser) Memory usage with Timer on Page

3 posts, 1 answers
  1. rugydp
    rugydp avatar
    20 posts
    Member since:
    Jul 2014

    Posted 26 Jul 2017 Link to this post

    Hi

    I have a page with a timer, a grid and a quite complex scheduler. The trigger checks for new records in a database table and refreshes/rebinds the grid if new information is available.

    Every time the timer triggers, memory consumption goes up about 15-20MB for a RadScheduler with about 150-200 appointments, about 3-4 MB for about 20 appointments (no rebinding of scheduler). After a few hours memory consumption of the page in Chrome is almost at 2GB and the page is unusable. Only restarting the browser helps fixing the issue.

     

    This happens also when Timer is off and I navigate back and forth in the RadScheduler in WeekView. This time the scheduler is rebinding, of course.

    Any hints where I could look for ewithout having to post the code? Or any example with timers and RadScheduler?

     

    Thank you very much...

     

  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    4939 posts

    Posted 27 Jul 2017 Link to this post

    Hello,

    AJAX requests use JS to replace the HTML markup and DOM objects when new content arrives. This should be expected to take some memory, depending on the amount of HTML and the complexity of the DOM.

    Browsers tend to release memory when a full postback occurs or when the page unloads fully (e.g., when you navigate to a different page). This is entirely up to the browser and to the resources available on the machine and we cannot force the browser to free the memory.

    What I can suggest you look into is some form of counter that does a full postback or window.location.href = window.location.href every once in a while to see whether this helps the browser release memory.

    Regards,

    Marin Bratanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. rugydp
    rugydp avatar
    20 posts
    Member since:
    Jul 2014

    Posted 03 Aug 2017 in reply to Marin Bratanov Link to this post

    Thank you Marin. As a workaround I force a full postback every 10 minutes of user inactivity and it solves the problem. 

    Regards,

    Ruggero

Back to Top