1. #1
    Sencha User
    Join Date
    Aug 2013
    Location
    Italy
    Posts
    25
    Answers
    1
    Vote Rating
    4
    toto00785 is on a distinguished road

      0  

    Default Unanswered: make a navigation view faster

    Unanswered: make a navigation view faster


    hi,


    In a " navigationview " it is possible to avoid destroying the view that are instantiated at each step ? . Let me explain


    I have a situation very similar to this
    http://docs.sencha.com/touch/2.3.0/t...iew/index.html


    I have a navigationview , which displays a component list and when I click on an item opens a view showing the detail of the item selected .


    If I try to run the app on a device iphone 3gs, when I make a click on the item of the list , the second view is being loaded very slowly (it takes about 3 seconds). This is very stressful especially when you make the back and then click on another item in the list.


    Reading the documentation I know that when I click on the " back" function is called "pop" of the component " navigationview " that takes care of destroying the view looking at at that time.


    I wanted to know if it is possible to prevent the back button destroys the view , thus avoiding that every time I click on an item on the list, the view is instantiated again (thus avoiding maybe wait 3 seconds? )


    I tried to disable "auto-destroy" the navigation and view or even to create the view as singlenton but it was not the solution I was looking for .

    Thank you
    Giuseppe

  2. #2
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    321
    Answers
    9
    Vote Rating
    10
    keckeroo will become famous soon enough

      0  

    Default


    Hi there,

    This fiddle shows you how to properly implement dynamic adding (and re-adding the same) component to a navigationview without destroying them when they pop.

    https://fiddle.sencha.com/#fiddle/1hj

    Cheers,

    Kevin

  3. #3
    Sencha User
    Join Date
    Aug 2013
    Location
    Italy
    Posts
    25
    Answers
    1
    Vote Rating
    4
    toto00785 is on a distinguished road

      0  

    Default


    Thanks for your example. I tried and it works.


    I noticed, however, that the latency is still high. So I finally decided to implement the system manually using the layout of navigationbar card and latency were significantly reduced by 60%. I do not know how to explain the reason for the latency through the component navigatorbar, even though I have disabled the self-destruction.
    Why does this happen?

    Quote Originally Posted by keckeroo View Post
    Hi there,

    This fiddle shows you how to properly implement dynamic adding (and re-adding the same) component to a navigationview without destroying them when they pop.

    https://fiddle.sencha.com/#fiddle/1hj

    Cheers,

    Kevin

Thread Participants: 1

Tags for this Thread