Loading ...
Sorry, an error occurred while loading the content.

Leak Memory(?) YUI used in a (Internet Explorer6.0)

Expand Messages
  • ashihong
    Leak Memory(?) YUI used in a (Internet Explorer6.0) 1. The Page Source for Test the simple test pages as follow: page one(test.html)
    Message 1 of 3 , Aug 1, 2006
    View Source
    • 0 Attachment
      Leak Memory(?) YUI used in a <IFRAME>(Internet Explorer6.0)

      1. The Page Source for Test
      the simple test pages as follow:

      page one(test.html)

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      "http://www.w3.org/TR/html4/strict.dtd">
      <html>
      <head>
      <meta http-equiv="content-type" content="text/html;
      charset=utf-8">
      <script src="../../build/yahoo/yahoo.js"
      type="text/javascript"></script>
      <script src="../../build/event/event.js"
      type="text/javascript"></script>
      <script src="../../build/dom/dom.js"
      type="text/javascript"></script>
      <script src="../../build/dragdrop/dragdrop.js"
      type="text/javascript"></script>
      <script src="../../build/animation/animation.js"
      type="text/javascript"></script>
      <script src="../../build/container/container.js"
      type="text/javascript"></script>
      <script src="../../build/menu/menu.js"
      type="text/javascript"></script>
      <script
      src="../../build/autocomplete/autocomplete.js"
      type="text/javascript"></script>
      <script src="../../build/connection/connection.js"
      type="text/javascript"></script>
      </head>
      <body>
      </body>
      </html>

      page one just import a list of yui js files.

      page two(main.html)

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML>
      <BODY>
      <Iframe src="test.html"></Iframe>
      </BODY>
      </HTML>

      page two has a tag <IFrame> which is linked to the page one
      (test.html).


      2. The Step of Test

      use IE -> open test.html -> refresh this page (press F5) for several
      times (20 times or more).
      By task manager, we can see the memory usage is still a fluctuant
      curve.

      BUT!!
      IE -> main.html -> refresh this page. the task manager will show
      that the memory usage
      have a sharp stairstep in the curve. more refresh times, more memory
      usage.


      Can somebody give a explanation or a solution to avoid this situation?
    • Troy Wolf
      You ask why is the memory leak pattern different between the connection object in an IFRAME compared to the PARENT window. That is an interesting question
      Message 2 of 3 , Aug 17, 2006
      View Source
      • 0 Attachment
        You ask why is the memory leak pattern different between the
        connection object in an IFRAME compared to the PARENT window. That is
        an interesting question indeed...BUT...can we first address why the
        connection object leaks memory in the first place?!

        I have an application with a few dozen pages that all have updating
        components within the pages---simply other webpages that output small
        bits of data. I use the YUI connection object to auto-refresh those
        data components every 3 seconds. (or 5, 10, 30, 60 seconds as
        appropriate to the data)

        We notice a definite pattern in pages that use the connection object
        to frequently update parts of the page where in Firefox, the memory
        usage keeps riding until Firefox is unuseable. The problem does not
        appear in IE6, but now does in IE7.

        I am confident that I'm not doing anything strange with the
        object--using it almost exactly as shown in the documentation
        examples. This problem is serious enough that more people should be
        complaining--this perplexes me. If you have a webpage that uses the
        connection object to frequently update a part of the page and you are
        NOT seeing this issue, please send me a link if your page is publicly
        accessible. I'd love to test it in Firefox and IE7, and if your page
        does not have this problem, I will copy your connection object logic.

        Troy in Kansas City

        --- In ydn-javascript@yahoogroups.com, "ashihong" <ashihong@...> wrote:
        >
        > Leak Memory(?) YUI used in a <IFRAME>(Internet Explorer6.0)
        >
        > 1. The Page Source for Test
        > the simple test pages as follow:
        >
        > page one(test.html)
        >
        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        > "http://www.w3.org/TR/html4/strict.dtd">
        > <html>
        > <head>
        > <meta http-equiv="content-type" content="text/html;
        > charset=utf-8">
        > <script src="../../build/yahoo/yahoo.js"
        > type="text/javascript"></script>
        > <script src="../../build/event/event.js"
        > type="text/javascript"></script>
        > <script src="../../build/dom/dom.js"
        > type="text/javascript"></script>
        > <script src="../../build/dragdrop/dragdrop.js"
        > type="text/javascript"></script>
        > <script src="../../build/animation/animation.js"
        > type="text/javascript"></script>
        > <script src="../../build/container/container.js"
        > type="text/javascript"></script>
        > <script src="../../build/menu/menu.js"
        > type="text/javascript"></script>
        > <script
        > src="../../build/autocomplete/autocomplete.js"
        > type="text/javascript"></script>
        > <script src="../../build/connection/connection.js"
        > type="text/javascript"></script>
        > </head>
        > <body>
        > </body>
        > </html>
        >
        > page one just import a list of yui js files.
        >
        > page two(main.html)
        >
        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        > <HTML>
        > <BODY>
        > <Iframe src="test.html"></Iframe>
        > </BODY>
        > </HTML>
        >
        > page two has a tag <IFrame> which is linked to the page one
        > (test.html).
        >
        >
        > 2. The Step of Test
        >
        > use IE -> open test.html -> refresh this page (press F5) for several
        > times (20 times or more).
        > By task manager, we can see the memory usage is still a fluctuant
        > curve.
        >
        > BUT!!
        > IE -> main.html -> refresh this page. the task manager will show
        > that the memory usage
        > have a sharp stairstep in the curve. more refresh times, more memory
        > usage.
        >
        >
        > Can somebody give a explanation or a solution to avoid this situation?
        >
      • Thomas S. Sha
        ... Can I have a look at your code, or preferably a link to the web application? Feel free to email me offline if you don t wish to post the link here on the
        Message 3 of 3 , Aug 17, 2006
        View Source
        • 0 Attachment
          --- In ydn-javascript@yahoogroups.com, "Troy Wolf" <troy@...> wrote:
          >
          > You ask why is the memory leak pattern different between the
          > connection object in an IFRAME compared to the PARENT window. That is
          > an interesting question indeed...BUT...can we first address why the
          > connection object leaks memory in the first place?!
          >
          > I have an application with a few dozen pages that all have updating
          > components within the pages---simply other webpages that output small
          > bits of data. I use the YUI connection object to auto-refresh those
          > data components every 3 seconds. (or 5, 10, 30, 60 seconds as
          > appropriate to the data)
          >
          > We notice a definite pattern in pages that use the connection object
          > to frequently update parts of the page where in Firefox, the memory
          > usage keeps riding until Firefox is unuseable. The problem does not
          > appear in IE6, but now does in IE7.
          >
          > I am confident that I'm not doing anything strange with the
          > object--using it almost exactly as shown in the documentation
          > examples. This problem is serious enough that more people should be
          > complaining--this perplexes me. If you have a webpage that uses the
          > connection object to frequently update a part of the page and you are
          > NOT seeing this issue, please send me a link if your page is publicly
          > accessible. I'd love to test it in Firefox and IE7, and if your page
          > does not have this problem, I will copy your connection object logic.

          Can I have a look at your code, or preferably a link to the web
          application? Feel free to email me offline if you don't wish to post
          the link here on the forum.

          Regards,
          Thomas
        Your message has been successfully submitted and would be delivered to recipients shortly.