Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-2641 in a recent build.
  1. #1
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    42
    Vote Rating
    0
    atik.kazi is on a distinguished road

      0  

    Default store garbage collection

    store garbage collection


    Hello,

    When is the garbage collection of store done?

    In my app I have a store bound to a list. Whenever I get updated data I recreate the store and bind it to list.
    I see that every time I recreate store it increases the utilized app memory by ~6MB.
    I tried reusing the same store by retrieving the store from store manager and calling store.removeAll and store.setData. I observed that whenever I use setData the memory increased by ~6MB. I have attached sample apps. I have used both the scenarios of reusing the store as well as recreating store. In these app too I can see that the memory consumed by apps increases by ~2MB (since data is not as huge as we get in our app) whenever I navigate.

    Kindly let me know how can I resolve this issue.

    Also I have observed that whenever I refresh the app memory consumption increases.

    I have removed the sencha libraries from the sample app coz of size restrictions. Kindly copy them to make apps run.
    Attached Files

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,125
    Vote Rating
    855
    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


    Are the stores put into the StoreManager via the storeId?
    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.

  3. #3
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    42
    Vote Rating
    0
    atik.kazi is on a distinguished road

      0  

    Default


    Yes. I have attached apps having both the scenarios. One app doesnt have storeId for store and I am always recreating the store. Whereas the other app has storeId for the store and I am reusing the same store by retrieving it from store manager and using store.removeAll and store.setData

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    Hi atik,

    Thanks for the test cases. Ensuring minimal memory consumption is high on our list of things to look at for 2.1. Your samples will help us greatly. I'm moving this thread to our bug forum, so that I can open a ticket for it in our internal system. This will allow us to provide better feedback to you on our progress with this.

    Best,
    Tommy

  5. #5
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    42
    Vote Rating
    0
    atik.kazi is on a distinguished road

      0  

    Default


    Any solution to this problem?

  6. #6
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    42
    Vote Rating
    0
    atik.kazi is on a distinguished road

      0  

    Default


    Thanks for the reply. I hope we will get a resolution soon if it is a bug ,as we had our product release lined up and with this issue we cannot release our product. Thanks again for your reply.

  7. #7
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    No problem. Sorry we don't have a workaround for you at this point. We are working on some other stuff for the upcoming 2.0.1 release, but I'll make sure we have a look somewhere in the middle of next week to see if we can provide a patch for you.

    I'm curious though, does this problem become so bad for you that the app crashes, and is this thus the reason you cannot release your product?

    Best,
    Tommy

  8. #8
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    42
    Vote Rating
    0
    atik.kazi is on a distinguished road

      0  

    Default


    Hi Tommy..

    Yes... Coz we have pretty complex and huge data coming from server. Also the stores are created at various places due to different data interactions. Our app is pretty complex in terms of the data that it is handling. We can run the app for around 25-30 min without crash on android but on iPhone it is too sensitive and is getting crashed within 5-6 min. When I started debugging the app for memory issues then I found that majority of memory consumption is happening at the places where we are creating/reusing the store. Some times I see the memory consumed is going beyond 100MB only after few minutes.
    I observed that only one single store when recreated/reused is increasing memory consumption by around -6MB. And the combined effect is causing the app to crash.

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    Sounds like the old store's are somehow not being destroyed properly. Again, I'll take a look into this and expect to get back to you somewhere this week.

  10. #10
    Touch Premium Member
    Join Date
    Sep 2011
    Posts
    41
    Vote Rating
    0
    prasanna_hr is on a distinguished road

      0  

    Default Memory usage

    Memory usage


    Hi Tommy,

    3 questions on this

    1. We have observed (through the developer tools on Chrome and Safari) that in our application, as soon as we create a store with data, the memory usage goes up by 6 MB. The data is in JSON format and size of that string itself is around 33 KB. Isn't this kind of consumption too high for the size of the data? Or is there something different we can do? We are using Memory proxy.

    I am worried that in our next phases of development, we would need more data to be loaded. Wondering how we handle additional data if with this itself the app is crashing due to memory issues.

    2. Is there a work around for this right now? Eg. Use a different type of proxy? Would that help at all?

    3. Do you have any timeline for a resolution to this bug? Week? Couple of weeks? Month?

    Just would like to reiterate that we are handicapped right now because of this. The app stays much longer on Android devices but crashes pretty fast on iOS devices (stays not more than a minute or two).

    Thanks & Regards
    Prasanna