Results 1 to 8 of 8

Thread: Template - ItemdId - Memory leak

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User th3nu11's Avatar
    Join Date
    Apr 2013
    Posts
    32
    Vote Rating
    0
      0  

    Default Template - ItemdId - Memory leak

    Sencha Touch version tested:
    • 2.3.1
    Platform tested against:
    • Browser and devices
    Description:

    There is a memory leak if you use itemId in template elements the memory . Ext.dom.Element.cache increase every time you show a template.

    Steps:
    • Create a list that use template (tpl:String/String[]/Ext.Template/Ext.XTemplate[]) for items
    • Create a store with many elements
    • Write template using some html elements (an heavy elements is better)
    • Add to template elements an attribute itemId
    • get this element by item.element.down
    • call "store.load()" continuously


    • The result that was expected:
    Memory will be realeased by garbage collectors




    The result that occurs instead:
    Memory will be not released!
    Ext.dom.Element.cache grow up!

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,088
    Vote Rating
    136
      0  

    Default

    The JS garbage collector releases memory at random times how long of a period are you testing over?
    I would also suggest using the Chrome developer tools profile panel to check for leaks.
    FYI when you take a heap snapshot in chrome dev tools it does initiate the garbage collector.
    It would help expedite this issue if you put together a fiddle and verify that it reproduces this behavior.
    https://fiddle.sencha.com/#home
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha User th3nu11's Avatar
    Join Date
    Apr 2013
    Posts
    32
    Vote Rating
    0
      0  

    Default

    I investigated better this behavior:
    1. I run a query on html element (in my case on element of an item template)
    2. senchaTouch creates an "Ext.dom.Element" for the query result element
    3. this element will be cached in "Ext.domElement.cache"
    4. nobody never will remove it.
    I must remove it from cache
    delete Ext.dom.Element.cache[element.id];

    am I doing something wrong?

  4. #4
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,088
    Vote Rating
    136
      0  

    Default

    You should not have to. Can you provide a fiddle that reproduces this behavior.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  5. #5
    Sencha User th3nu11's Avatar
    Join Date
    Apr 2013
    Posts
    32
    Vote Rating
    0
      0  

    Default

    tap button many times and watch the browser console.
    Attached Files Attached Files

  6. #6
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,088
    Vote Rating
    136
      0  

    Default

    Thanks for the test case. I have verified that it reproduces the issue you are reporting. I am unfamiliar with the itemId attribute. For what purpose are you using it?
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •