1 2 Previous Next 20 Replies Latest reply on Mar 31, 2008 2:43 PM by richuserone

    Memory leak or feature?

    gkuzmin

      Richfaces 3.1.4.GA
      The memory, that the browser uses, increases dramatically.
      The navigation between 2 the same sites adds about 0,3Mb per click.
      (especially in Ferifox (firebag disable))
      There is this Problem by sombody else?

        • 1. Re: Memory leak or feature?
          nbelaevski

          Could you please provide some more info, e.g. page code?

          • 2. Re: Memory leak or feature?
            mail.micke

            Hi,
            i notice a memory increase as well when clicking around the live-demo site, which isn't cleared up when closing the tab.

            • 3. Re: Memory leak or feature?
              gkuzmin

              Facelets 1.1.13 or 1.1.14, Richfaces 3.1.4.GA, Myfaces 1.1.5

              I use mainly rich:modalPanel and rich:toolTip.
              For example:
              ...

              <div class="ag_detail_text" style="width:110px;">
               <div style="float:left;">Name</div>
               <rich:panel styleClass="info_btn2" style="float:right;cursor:help;border:none" >
               <rich:toolTip followMouse="true" irection="bottom- right" delay="500" style="width:100px">
               <span style="white-space:nowrap">
               Name
               </span>
               </rich:toolTip>
               </rich:panel>
              </div>


              <div style="float:left; margin-left:10px; margin-top:6px;">
              
               <h:commandLink onclick="javascript:Richfaces.showModalPanel($$('form')[0].id + ':panel3');return false;">
               <sur:button_only text="New"/>
               </h:commandLink>
               <rich:modalPanel id="panel3" top="280" left="298" width="200" height="100" resizeable="false">
               <f:facet name="header">
               <div style="font-size:12px;">
               Message...
               </div>
               </f:facet>
               <f:facet name="controls">
               <h:graphicImage value="../../grafix/delete_vh.gif"
               style="cursor:pointer;width:13px;height:13px;margin-left:10px;"
               onclick="javascript:Richfaces.hideModalPanel($$('form')[0].id + ':panel3')"/>
               </f:facet>
               <div>
               <div style="float:top;margin-top:5px;">
               <div style="margin-left:26px;">
               New?
               </div>
               </div>
               <div style="float:top;margin-top:10px;">
               <h:commandLink style="float:left;margin-left:40px;"
               onclick="javascript:Richfaces.showModalPanel($$('form')[0].id + ':panel3');" action="#{bpm.clear}">
               <sur:button_only text="Yes"/>
               </h:commandLink>
               <h:commandLink style="float:left;margin-left:20px;"
               onclick="javascript:Richfaces.hideModalPanel($$('form')[0].id + ':panel3');return false;">
               <sur:button_only text="No"/>
               </h:commandLink>
               </div>
               </div>
               </rich:modalPanel>
               </div>
              
               </div>


              • 4. Re: Memory leak or feature?
                brachie

                Hi,

                maybe this topic is linked to this one:
                http://www.jboss.com/index.html?module=bb&op=viewtopic&t=126511

                This memory leak leads to a very slow Firefox after working with the application for a while. In my opinion that's a reason why the current version of Richfaces is not production ready in my case!

                Regards,
                Alexander

                • 5. Re: Memory leak or feature?
                  gkuzmin

                  I don' see, that RichFaces Team payes attension to this problem. It worryes me, becouse in this case the next versions of RichFaces has the problem too. It seems, this is coomon problem, not only the problem of some Richfaces' components.

                  • 6. Re: Memory leak or feature?

                    We pay attention on all reported problems. However, we cannot fix something that is not reproducible or we have no power to fix (like bugs in FF or Safari themself)

                    • 7. Re: Memory leak or feature?

                      Result, reported by tools from http://wiki.mozilla.org/Performance:Leak_Tools#leak-gauge:

                      Leaked outer window 34135a0 at address 34135a0.
                      Leaked inner window 344be68 (outer 34135a0) at address 344be68.
                      ... with URI "about:blank".
                      Leaked outer window 34479f0 at address 34479f0.
                      Leaked inner window 349c420 (outer 34479f0) at address 349c420.
                      ... with URI "about:blank".


                      Also, see http://www.get-firefox-now.net/category/bugs/

                      On this moment we have no any proved cases that memory is leaking because of RichFaces code. If found we will fix.

                      • 8. Re: Memory leak or feature?
                        nathandennis

                        that is actually comforting... i was trying to hunt down the memory leak in my application. knowing the bug is in FF makes more sense now.

                        • 9. Re: Memory leak or feature?
                          nbelaevski

                          Compare that with the same results for FF 3.0b4 nightly:

                          Summary:
                          Leaked 0 out of 19 DOM Windows
                          Leaked 0 out of 74 documents
                          Leaked 0 out of 5 docshells

                          I've set XPC_SHUTDOWN_HEAP_DUMP environment variable according to http://wiki.mozilla.org/Performance:Leak_Tools#JavaScript_heap_dump and got nothing. So I guess there are no leaks (I'm still missing debug build of some 2.0 release FF version to be absolutely sure. If I get one I'll try...).

                          • 10. Re: Memory leak or feature?
                            nbelaevski

                            So, here is summary post.

                            I've done little test (just a page walk) for simple AJAX components (support, status, link), tree, calendar, modal panel using livedemo. Win 32 platform, BTW. Results:

                            FF 2.0.12

                            Leaked outer window 2c16ff0 at address 2c16ff0.
                            Leaked inner window 2c17240 (outer 2c16ff0) at address 2c17240.
                             ... with URI "about:blank".
                            Leaked outer window 2c17368 at address 2c17368.
                            Leaked inner window 330aff0 (outer 2c17368) at address 330aff0.
                             ... with URI "about:blank".
                            Leaked outer window 3c2f000 at address 3c2f000.
                            Leaked inner window 3c306f8 (outer 3c2f000) at address 3c306f8.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/welcome.jsf".
                            Leaked inner window 3f7cef8 (outer 3c2f000) at address 3f7cef8.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree".
                            Leaked inner window 3f7de48 (outer 3c2f000) at address 3f7de48.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/richfaces/modalPanel.jsf?c=modalPanel".
                            Leaked inner window 5c56ad8 (outer 3c2f000) at address 5c56ad8.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar".
                            Leaked document at address 323e928.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/welcome.jsf".
                            Leaked document at address 41a43d8.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree".
                            Leaked document at address 3da7270.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?javax.portlet.faces.DirectLink=true".
                            Leaked document at address 41a4680.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/richfaces/modalPanel.jsf?c=modalPanel".
                            Leaked document at address 41a4928.
                             ... with URI "http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar".
                            
                            Summary:
                            Leaked 9 out of 16 DOM Windows
                            Leaked 5 out of 73 documents
                            Leaked 0 out of 3 docshells


                            FF 3.0b4 NIGHTLY:
                            Summary:
                            Leaked 0 out of 19 DOM Windows
                            Leaked 0 out of 74 documents
                            Leaked 0 out of 5 docshells


                            Raw log for FF 2.0.12: http://pastebin.com/m26bfa7f5


                            • 11. Re: Memory leak or feature?

                              Thank you very much for paying attention to this topic! We are developing a maintenance tool for broadcast management/tv stations based on JSF/RF (released about the same time of RF 3.2.0) that should theoretically run 24 hours a day, seven days a week...I'm not sure if this is possible with todays browsers, we will see...I hope we have a little test environment with real devices controlled by our new RF application.

                              Anyway, I tested Opera (only by clicking through the live demo and watching memory usage) and there was NO increase. Is there a tool for detecting memory leaks in opera, too?

                              • 12. Re: Memory leak or feature?

                                Just want to add to this thread. The DEMO site is using up lots of memory -- about 2 mb per page refresh -- this is both in IE and FF all versions. Any idea what the problem is?

                                • 13. Re: Memory leak or feature?
                                  nbelaevski

                                  I've just filed an issue for that: http://jira.jboss.com/jira/browse/RF-2224

                                  FF 3.0b4pre is doing well, but FF 2.0.12 is consuming a lot of memory. So I'm going to dig the issue and find some workaround that'll fix these memory leaks

                                  • 14. Re: Memory leak or feature?
                                    gkuzmin

                                    Thank you very much for paying attention to this problem

                                    1 2 Previous Next