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

Get utility, IE, onreadystatechange and memory leak

Expand Messages
  • yaundro
    Hello team, judging from what I can see in the windows process explorer, by looking at the Get.js code, and in IE7 s new js-memoryleak toolbar s reported leaks
    Message 1 of 7 , May 28, 2008
    • 0 Attachment
      Hello team,

      judging from what I can see in the windows process explorer, by
      looking at the Get.js code, and in IE7's new js-memoryleak toolbar's
      reported leaks (set up so that it also reports IE6 leaks), it appears
      that:

      In IE, the "onreadystatechange" handler that is attached to the
      <script> and <link> nodes is not removed when the resource is done
      loading; which can lead to memory leaks.

      [Note that the "onreadystatechange" handler is removed when an
      "autopurge" occurs, but those happen every 20 node insertion.]

      Should I file a bug in the tracker?

      Best regards,
      Arnaud
    • Arnaud Diederen
      Hi team, Have I missed something, or would there indeed be a leak (at least in IE6), there? If it s the case, I can report a bug in the tracker. Best, A.
      Message 2 of 7 , May 29, 2008
      • 0 Attachment
        Hi team,

        Have I missed something, or would there indeed be a leak (at least in
        IE6), there?

        If it's the case, I can report a bug in the tracker.

        Best,
        A.

        yaundro wrote:
        > Hello team,
        >
        > judging from what I can see in the windows process explorer, by
        > looking at the Get.js code, and in IE7's new js-memoryleak toolbar's
        > reported leaks (set up so that it also reports IE6 leaks), it appears
        > that:
        >
        > In IE, the "onreadystatechange" handler that is attached to the
        > <script> and <link> nodes is not removed when the resource is done
        > loading; which can lead to memory leaks.
        >
        > [Note that the "onreadystatechange" handler is removed when an
        > "autopurge" occurs, but those happen every 20 node insertion.]
        >
        > Should I file a bug in the tracker?
        >
        > Best regards,
        > Arnaud
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Arnaud Diederen
        Hello again team, this issue does not seem to passionate anyone, which I can understand ;) However, if I m right, I think this would be a rather important
        Message 3 of 7 , May 30, 2008
        • 0 Attachment
          Hello again team,

          this issue does not seem to passionate anyone, which I can understand ;)
          However, if I'm right, I think this would be a rather important problem.
          Can somebody tell me whether I've missed something obvious or whether
          there's, indeed, a (potentially important) memory leak in there?

          Regards,
          A.

          yaundro wrote:
          > Hello team,
          >
          > judging from what I can see in the windows process explorer, by
          > looking at the Get.js code, and in IE7's new js-memoryleak toolbar's
          > reported leaks (set up so that it also reports IE6 leaks), it appears
          > that:
          >
          > In IE, the "onreadystatechange" handler that is attached to the
          > <script> and <link> nodes is not removed when the resource is done
          > loading; which can lead to memory leaks.
          >
          > [Note that the "onreadystatechange" handler is removed when an
          > "autopurge" occurs, but those happen every 20 node insertion.]
          >
          > Should I file a bug in the tracker?
          >
          > Best regards,
          > Arnaud
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
        • Adam Moore
          ... Yes, the tracker is the right place for this. Please file a report, and I ll look into it. Thanks, -Adam
          Message 4 of 7 , May 30, 2008
          • 0 Attachment
            On Wed, May 28, 2008 at 10:25:58AM -0000, yaundro wrote:
            > judging from what I can see in the windows process explorer, by
            > looking at the Get.js code, and in IE7's new js-memoryleak toolbar's
            > reported leaks (set up so that it also reports IE6 leaks), it appears
            > that:
            >
            > In IE, the "onreadystatechange" handler that is attached to the
            > <script> and <link> nodes is not removed when the resource is done
            > loading; which can lead to memory leaks.
            >
            > [Note that the "onreadystatechange" handler is removed when an
            > "autopurge" occurs, but those happen every 20 node insertion.]
            >
            > Should I file a bug in the tracker?

            Yes, the tracker is the right place for this. Please file a report,
            and I'll look into it.

            Thanks,

            -Adam
          • Arnaud Diederen
            ... Done. Thank you! A.
            Message 5 of 7 , Jun 2, 2008
            • 0 Attachment
              Adam Moore wrote:
              On Wed, May 28, 2008 at 10:25:58AM -0000, yaundro wrote:
                
              judging from what I can see in the windows process explorer, by
              looking at the Get.js code, and in IE7's new js-memoryleak toolbar's
              reported leaks (set up so that it also reports IE6 leaks), it appears
              that:
              
              In IE, the "onreadystatechange" handler that is attached to the
              <script> and <link> nodes is not removed when the resource is done
              loading; which can lead to memory leaks.
              
              [Note that the "onreadystatechange" handler is removed when an
              "autopurge" occurs, but those happen every 20 node insertion.]
              
              Should I file a bug in the tracker?
                  
              Yes, the tracker is the right place for this.  Please file a report,
              and I'll look into it.
                

              Done.
              Thank you!

                      A.

              Thanks,
              
              -Adam
                

            • tssha
              ... How about implementing either of the following solutions? 1) Set the autopurge threshold to a lower limit to trigger autopurge more frequently (e.g.,
              Message 6 of 7 , Jun 2, 2008
              • 0 Attachment
                --- In ydn-javascript@yahoogroups.com, Arnaud Diederen <ad@...> wrote:
                >
                > Hello again team,
                >
                > this issue does not seem to passionate anyone, which I can understand ;)
                > However, if I'm right, I think this would be a rather important problem.
                > Can somebody tell me whether I've missed something obvious or whether
                > there's, indeed, a (potentially important) memory leak in there?

                How about implementing either of the following solutions?

                1) Set the autopurge threshold to a lower limit to trigger autopurge
                more frequently (e.g., YAHOO.util.Get.PURGE_THRESH = n)?

                2) Call the purge() method of the argument object to explicitly remove
                the script node?

                Regards,
                Thomas
              • Arnaud Diederen
                Hi Thomas, ... Sure, that d help. The point here is that the YUI does quite a few things on unload of the page (destroying the DnD entries that are left, ...)
                Message 7 of 7 , Jun 3, 2008
                • 0 Attachment

                  Hi Thomas,

                  tssha wrote:
                  --- In ydn-javascript@yahoogroups.com, Arnaud Diederen <ad@...> wrote:
                    
                  Hello again team,
                  
                  this issue does not seem to passionate anyone, which I can understand ;)
                  However, if I'm right, I think this would be a rather important problem.
                  Can somebody tell me whether I've missed something obvious or whether 
                  there's, indeed, a (potentially important) memory leak in there?
                      
                  How about implementing either of the following solutions?
                  
                  1) Set the autopurge threshold to a lower limit to trigger autopurge
                  more frequently (e.g., YAHOO.util.Get.PURGE_THRESH = n)?
                  
                  2) Call the purge() method of the argument object to explicitly remove
                  the script node?
                    

                  Sure, that'd help.

                  The point here is that the YUI does quite a few things on unload of the page (destroying the DnD entries that are left, ...) so I figured it might be worth put a handler that'd take care of the imported script nodes in the YUI itself, rather than every YUI API user having to know and care about that limitation.
                  (actually, in this case, I'm not sure putting an onunload handler is the best solution: the YUI Get utility is aware when a script is loaded, so it might remove the onreadystatechange handler right away, couldn't it?)

                  Meanwhile, I can still use the workarounds you proposed!

                  Regards,
                        A.

                  Regards,
                  Thomas
                  
                  
                  
                  
                  ------------------------------------
                  
                  Yahoo! Groups Links
                  
                  <*> To visit your group on the web, go to:
                      http://groups.yahoo.com/group/ydn-javascript/
                  
                  <*> Your email settings:
                      Individual Email | Traditional
                  
                  <*> To change settings online go to:
                      http://groups.yahoo.com/group/ydn-javascript/join
                      (Yahoo! ID required)
                  
                  <*> To change settings via email:
                      mailto:ydn-javascript-digest@yahoogroups.com 
                      mailto:ydn-javascript-fullfeatured@yahoogroups.com
                  
                  <*> To unsubscribe from this group, send an email to:
                      ydn-javascript-unsubscribe@yahoogroups.com
                  
                  <*> Your use of Yahoo! Groups is subject to:
                      http://docs.yahoo.com/info/terms/
                  
                    

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