1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    187
    Answers
    5
    Vote Rating
    3
    olouvignes is on a distinguished road

      0  

    Default Unanswered: removeAll() vs removeAll(true) perf?

    Unanswered: removeAll() vs removeAll(true) perf?


    Basically, i just want to understand when it can be considered useful to/not-to destroy elements with the true parameter. In my app, if I updateWithRecord() a form and need to build it there (dynamic structure), so first i have to clear previous built form :

    Considering that I can have a 10-item list (not a fixed-number but quite low) that will be rendered on itemtap as different forms (like one with dates, one with dates and textfields)... Should I destroy old elements with removeAll(true) when a new form has to be rendered? I'm trying to get the best perf.

    There may be a lot of comings-and-goings. If i do not destroy, will they stack somewhere a overflow memory at some point??!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3357
    Vote Rating
    751
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    If you want to reuse a component and keep it's state (data in form fields of a remove form or selection in a list) then not destroying the component could be used. There is of course ways around this to recreate a component.

    Reusing isn't bad even if you have different uses for them. Creating new components does have a small perf hit so if you just want to update HTML then you could keep a component around and just update it's html.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

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

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

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

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar