Results 1 to 3 of 3

Thread: Destroying components makes UI hang

  1. #1
    Sencha Premium User
    Join Date
    Nov 2016
    Posts
    11
    Vote Rating
    0
      0  

    Default Destroying components makes UI hang

    I am working on a fairly large 6.5 modern app and am running into some issues with destroying components. Some of our screens have a large number of components (a mix of stock and custom components). Everything runs fine when loading or using the app but when we navigate away from a particular screen the cleanup process can take quite a while and it blocks the main thread. Currently we have a card layout that just removes the active item when you navigate to something else.

    I'm looking for solutions to keep from hampering the user experience while navigating the app. I tried writing a recursive solution that went to the bottom of the component tree and destroyed the bottom pieces, did a setTimeout, and then removed the parent, so on and so forth. This solution stopped blocking the main thread and destroyed the components however, ext didn't seem to like that I was taking component clean up into my own hands.

    Is there a different way of approaching the problem or a safe way to destroy children so that parents don't error?

  2. #2
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,319
    Answers
    19
    Vote Rating
    588
      0  

    Default

    Did you try to find which component takes a long time to destroy and why?

    There's way to delay property clearing by setting the clearPropertiesOnDestroy prop to async, which is true by default.

    I'd try to find out why it takes a long time to destroy components. Usually, destruction shouldn't take a long time.

  3. #3
    Sencha Premium User
    Join Date
    Nov 2016
    Posts
    11
    Vote Rating
    0
      0  

    Default

    Awesome! I have not seen that property before. I will look through the system and see if that fixes the issue.

Similar Threads

  1. Destroying the components of a window
    By vertex in forum Community Discussion
    Replies: 1
    Last Post: 9 May 2011, 4:48 AM
  2. [CLOSED] Destroying all windows makes breaks MessageBox
    By Illiarian in forum Ext 3.x: Bugs
    Replies: 1
    Last Post: 10 Nov 2010, 4:56 AM
  3. window close not destroying the components within it
    By kckc1234 in forum Ext 2.x: Help & Discussion
    Replies: 12
    Last Post: 15 Mar 2009, 11:53 PM

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
  •