Results 1 to 3 of 3

Thread: ST/Mobile performance consideration

  1. #1

    Default ST/Mobile performance consideration

    Hi there,
    have a question about reusing views. What's the best practices for creating / instancing new & old views in a ST / mobile app? What i mean is should i destroy views or should i hold them for later use?

    In the Sencha docs i often see something like that:
    var myList = {xtype: "list"}

    which is not a instance but a JSON object only. Only if we do viewport.add or animateActiveItem() we get a new instance without reference (right?) . So each time "add" or "animateActiveItem" or "setActiveItem" is called we create a new instance.

    If we do Ext.create('Ext.List', {}) we get an instance which we can add to viewport and reuse later on.

    But whats better now? If we create a new instance each time a view is called? Or should we "save" each instance of a view and reuse them? I think recreating view instances each time should be expensive but holding a lot of (unused) views in memory should also be expensive.

    So whats your way of creating views and what do you think is faster?

    Thanks for reading

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    599

    Default 2 cent

    Here a link to the same problem.
    I put my opinion further down.

  3. #3

    Default

    Thanks for pointing me to this thread.

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
  •