Results 1 to 2 of 2

Thread: Is it better to close or hide window from performance standpoint

  1. #1
    Sencha User
    Join Date
    Jun 2008
    Posts
    138

    Default Is it better to close or hide window from performance standpoint

    On a button click, I create a new window that contains a tree, grid, and tabpanel. From a performance / best practice standpoint, should I do:

    A: recreate window on every button click and set window.closeAction: 'true'

    B: create window if first time else reset window content and show hidden window. window.closeAction: 'hide'

    Some things to consider:
    1. Will keeping the window hidden use up a lot of browser memory due to lots of dom objects floating around?
    2. Will recreating the window every time be a waste of time?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716

    Default

    If the window will be in use a lot, then I would hide it. You can use xtype rendering to load it only when needed,
    but once you have it loaded, just keep it around and show it when needed.

    Regards,
    Scott.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •