High memory usage, using of iframe

  1. #1

    High memory usage, using of iframe

    Hi,

    I work with Ext.Net since a couple of years.
    I use Ext.window.Window or app.getDesktop().createWindow() to create dynamic windows on a desktop application.

    I remarked that the memory of my web browser grows up after using my application (1 Gb after 2 or 3 hours of use!)
    I set the closeAction of the window to 'destroy'.

    I also saw in the html generated code that contains in the head part some links to ext-all-js, extnet-all-js and all ext css and other javascript files.
    I saw that if I close the window, all the dom elements are destroyed (the iframe disappered), but what about the javascript and css loaded previously? in the web browser cache?

    What is the reason that explains this leap memory?

    Thank you.
  2. #2
    It is known issue, unfortunatelly ExtJS doesn't clear memory correctly when iframe is destroyed
    Please see
    http://forums.ext.net/showthread.php?21063

    Therefore we don't recommend to use iframes (it is very hard mode for browser)
    Please consider to use dynamic rendering instead iframes
  3. #3
    Thanks Vladimir,

    I read the previous thread explaining the problem.
    But I don't understand how you can load ext.net component during a direct request.

    For example, I have 2 forms first.aspx and second.aspx.
    I have to display the 2nd form as a modal window from the 1st window.
    Actually, I use
    Ext.window.Window({
      ...
      ...
      loader: {
        url: 'second.aspx',
        loadMask: true,
        scripts: true,
        renderer: "frame"
      }
    }
    Could you give me a sample of using dynamic component loading via direct request in this case?

    Thank tou.
    Regards.
  4. #4
    You don't need to place widgets in the aspx page
    Just create it in codebehind
    https://examples2.ext.net/#/XRender/Basic/Add_Items/

    or place in the user control and render it
    https://examples2.ext.net/#/XRender/...rol/Lazy_Load/
  5. #5
    Hi,

    Ok, if I understand, in one hand I have to rewrite all the code from each aspx file to each .cs file in code behind : it's a major refactoring.

    Or, in a second hand I have to transform each aspx file to ascx file and load the user control into a window created in javascript : less impacting refactoring.

    There is no way to render an aspx file without passing by a user control : I just want to get the extjs components that I can add to a window or a panel in javascript.

    I imagine calling a directmethod like "GetModalWindowComponents" : it returns the javascript components corresponding of the rendering of the aspx file.
    Next, I just have to add all these components into a new Extjs Window.

    Regards.
  6. #6
    Hi,

    I think having found a way to resolve my issue.
    I started my investigation from this thread :
    http://forums.ext.net/showthread.php...x)-in-a-Window
    Thanks to Daniil.

    I still have a problem :
    The Id of each component of my user control is prefixed with an autogenerated Id.
    For example:
    Initial Id (in the .ascx file) : ID="tpProperty"
    Id of the loaded component : ID="id44212545f14b7bbc_tpProperty"

    How can I do to keep the original Id?

    Regards.
  7. #7
    In addition, the previous sample works with a window already declared in a form page.
    I want to create dynamic window.

    So I image create an extjs window in javascript and call a directmethod that returns the config of all the components that I will add to my window.
    But I didn't see any method to set config with a config object.
    How to set the config of the window from a config object or a string representing the config.
    The server direct method will use ComponentLoader.ToConfig("MyUserControl.ascx").

    How can I do it?

    Regards.

Similar Threads

  1. [CLOSED] Discussion: High performance with gridPanel
    By supera in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 22, 2013, 11:37 AM
  2. [CLOSED] High CPU on hundred of users
    By jeybonnet in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 10, 2012, 4:06 PM
  3. Replies: 2
    Last Post: Jan 19, 2012, 12:42 PM
  4. Replies: 7
    Last Post: Sep 22, 2010, 8:07 AM
  5. Replies: 9
    Last Post: Feb 24, 2009, 3:17 PM

Tags for this Thread

Posting Permissions