Memory Leaks still exists

8 posts, 0 answers
  1. Markus
    Markus avatar
    14 posts
    Member since:
    Apr 2012

    Posted 23 Apr 2013 Link to this post

    Hello everybody,

    referring to the thread: http://www.kendoui.com/forums/dataviz/general-discussions/memory-leaks.aspx#2490157 we perfomed updates of kendoUI and jQuery. Unfortunately problem still exists after updating. 

    We spent a lot of time figuring out the cause. As you can see in the attached screenshot the Shapes and Ovals in the DataViz remain present in the DOM. Perhaps this isn´t new to you. Nevertheless we need a solution as soon as possible.

    I attached a screenshot where you can see the memory leak. 

    You can easly reproduce this behaviour using this test scenario:
    http://www.kendoui.com/forums/dataviz/general-discussions/memory-leaks.aspx#z8TQWdQYx0-1SLF-SWApjA .

    Feel free to contact me.

    Regards,
    Markus.




  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 23 Apr 2013 Link to this post

    Hi,

    What version of IE are you using in the test? The leaking elements are VML and it's not officially supported in IE 8 and above. The implementation that exists in quirks mode is known to be slow and buggy.

    I recommend you to try the test in standards mode where the Chart will use SVG in IE 9 and above (attached). The difference in performance and memory usage is quite dramatic.

    I hope this helps.

    Regards,
    Tsvetomir Tsonev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Markus
    Markus avatar
    14 posts
    Member since:
    Apr 2012

    Posted 23 Apr 2013 Link to this post

    Hi,

    you can reproduce this leaking bug in every browser - it's not only an IE problem. We tested this issue with IE 9, Firefox and Chrome as well.
    If you have a look at the Google Chrome Profile Tab and compare heap snapshots, you will see that some elements(Oval, Shapes...) are still in memory.

    // EDIT //

    If you have a look at the http://demos.kendoui.com/dataviz/line-charts/index.html line chart, you will find this leak. In your attached file are only Bars provided. So, maybe this help. We will work on it...

    // EDIT //

    Regards,

    Markus.



  5. Markus
    Markus avatar
    14 posts
    Member since:
    Apr 2012

    Posted 24 Apr 2013 Link to this post

    Hello again,

    I figured out that a event listener is not removed when calling kendoDestory(). I modified chart count to 200 as suggested and also changed some code by myself in kendo.all.js. 

    I attached two screenshots which will show you the improvement when using the modified code.

    Regards,

    Markus.
  6. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 25 Apr 2013 Link to this post

    Hello,

    Thank you for taking your time to investigate this issue.

    Which handler is not being detached? The destroy method detaches all handlers initialized in attachEvents, but obviously we're missing something.

    Greetings,
    Tsvetomir Tsonev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. Markus
    Markus avatar
    14 posts
    Member since:
    Apr 2012

    Posted 25 Apr 2013 Link to this post

    Hello Tsvetomir,

    update lines 7863- 7887 in kendo.all.js.

    Please feel free to change or edit my code style :)). I'm looking forward to get your feedback.

    Best regards,

    Markus.

       
    // Edit
    if (support.eventCapture) {
     var downEvents = kendo.eventMap.up.split(" "), idx = 0, length = downEvents.length, surfaceElement = that.surface[0];
    that.preventIfMoving = function(e) {
    if (that._isMoved()) {
                            e.preventDefault();
                        }
                    };
                    for (;idx < length; idx++) {
                        surfaceElement.addEventListener(downEvents[idx], that.preventIfMoving, true);
                    }
                }
                that.bind([ PRESS, TAP, START, MOVE, END, CANCEL, GESTURESTART, GESTURECHANGE, GESTUREEND, GESTURETAP, SELECT ], options);
            },
            destroy: function() {
                var that = this, downEvents = kendo.eventMap.up.split(" "), idx = 0, length = downEvents.length, surfaceElement = that.surface[0];
                if (support.eventCapture) {
                    for (;idx < length; idx++) {
                        surfaceElement.removeEventListener(downEvents[idx], that.preventIfMoving, true);
                    }
                        }
    that.element.kendoDestroy(that.eventNS);
    that.surface.kendoDestroy(that.eventNS);
    that._disposeAll();
    that.unbind();
            },
  8. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 25 Apr 2013 Link to this post

    Hi,

    Thank you! We'll fix this problem as soon as possible.

    As a token of gratitude for your involvement your Telerik points have been updated.

    Greetings,
    Tsvetomir Tsonev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  9. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 26 Apr 2013 Link to this post

    Hi Markus,

    I am glad to inform you that your suggestion has been incorporated in our codebase, and it will be available in our next internal build. 

    Greetings,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready