Websync 4 - IE - Memory

43 views
Skip to first unread message

W.R. Matthiesen

unread,
Feb 13, 2013, 5:42:18 PM2/13/13
to web...@googlegroups.com
I  noticed under IE, that my app was growing about 15 meg per post back.  In an attempt to find out why, I created an empty page with nothing but the fm.min.js and fm.websync.min.js, and one asp:Linkbutton.
 
The code behind is empty as well.  Everytime I click the button and the page posts back, the iexplore.exe process memory grows 3-5 meg in size.
 
If I remove the fm.websync.min.js, it still grows, but by about 1-2 meg per post back.
 
If I remove the fm.min.js, it stop growin altogether.
 
Chrome does not suffer the same problem.  My app, unmodified and fully operational, doesn't grow at all.
 
Also, if I utilize sieve, it shows nothing wrong.  No leaks are detected.
 
I am open to suggestions.  Thanks
 

Jerod Venema

unread,
Feb 13, 2013, 8:43:32 PM2/13/13
to web...@googlegroups.com
Just to clarify...you've got:

1) A blank page
2) A link button
3) The WebSync js and the FM core js

The scripts do nothing, they're just included on the page. Then you click the button and cause postbacks a bunch of times, and the memory grows *and is never reclaimed*?

The key is that last item - the memory *is never reclaimed*. If you have JS on your page, it's guaranteed to increase the memory of your page load, because the browser is doing more, but eventually that growth with stop, and the memory will be reclaimed by the OS. This is normal behavior. You can confirm that the same thing happens with *any* JS library included on the page. 

If you're seeing the memory grow forever, and never reclaim, then that's a different question, but since the scripts don't do anything if they're just included on the page, it seems unlikely to me that that's what you're seeing.

Let us know if that's not the case!

Best,

 

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/XpcELFUN8DwJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jerod Venema
Frozen Mountain Software
http://www.frozenmountain.com/
(w) 919-300-5141
(c) 919-368-5105

W.R. Matthiesen

unread,
Feb 14, 2013, 8:07:44 AM2/14/13
to web...@googlegroups.com
Yes, that is the case.  Odd thing, this morning when I went to verify the results again, things seemed to have stopped for some reason.  But, when I closed the browser and started it again, it started right up again.  With just fm.min.js, it takes a while, but after clicking and clicking I got the memory up over 72,000k.  It did not stop there, I just wanted to note the size.
 
To be clear, the web.config I am using for the test is unmodified from my app.  It is configured for websync.
 
I am running IE 9, the 64 bit and the 32 bit version each produce the same results.
 
Thanks

Jerod Venema

unread,
Feb 14, 2013, 8:45:31 AM2/14/13
to web...@googlegroups.com
It's odd that it would stop and start...that seems pretty unlikely. You sure you don't have any funky plugins or something?

 
Thanks

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/JumwrscVszYJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

W.R. Matthiesen

unread,
Feb 14, 2013, 9:00:20 AM2/14/13
to web...@googlegroups.com
I disable most plugins that were there by default, and except for the google search, without recomendations, that I added, that is about it.  It's possible I wasn't watching the correct process this morning, it was early.  I have left that test app up, and continued to click off and on over that past 2 hours or so, and it is now over 100,000K, never shrinking.

Anton Venema

unread,
Feb 14, 2013, 12:25:18 PM2/14/13
to web...@googlegroups.com
If I can weigh in on this, have you tried swapping out fm.min.js with another JS library like jQuery to see if the leak is perhaps related to something else?


The problem you are describing doesn't reproduce over here, and ASP.NET controls and post-back view-state are known to have memory issues...

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



On Thu, Feb 14, 2013 at 6:00 AM, W.R. Matthiesen <wrmatt...@gmail.com> wrote:
I disable most plugins that were there by default, and except for the google search, without recomendations, that I added, that is about it.  It's possible I wasn't watching the correct process this morning, it was early.  I have left that test app up, and continued to click off and on over that past 2 hours or so, and it is now over 100,000K, never shrinking.

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/rp5ylKk-UIcJ.

W.R. Matthiesen

unread,
Feb 14, 2013, 2:13:07 PM2/14/13
to web...@googlegroups.com
Good suggestion.  If I put in jquery-1.8.1.js, the memory still grows.  At a much smaller rate.  maybe 4 to 8K at a time.  If I put a java script file of mine in, which is just a library of functions, nothing runs unless it is called, it doesn't grow at all.
 
I could provide a URL to point to, (outside of this forum) if you would think that would help.  I have no doubt that IE is to blame, but with the accumulation of memory in my full blown app, it will kill the browser eventually.  I have tested from several different machines, but they are all running IE 9 with the most recent service packs.  Some with Windows 7 Pro, one with Vista Ultimate.

Anton Venema

unread,
Feb 14, 2013, 2:20:39 PM2/14/13
to web...@googlegroups.com
That's a good indicator that there is something external to the JS lib causing the problem - undoubtedly something funny in IE or ASP.NET.

Feel free to shoot a private email with the URL to sup...@frozenmountain.com, but I'd like to keep the discussion public so anyone else experiencing similar issues can benefit.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



On Thu, Feb 14, 2013 at 11:13 AM, W.R. Matthiesen <wrmatt...@gmail.com> wrote:
Good suggestion.  If I put in jquery-1.8.1.js, the memory still grows.  At a much smaller rate.  maybe 4 to 8K at a time.  If I put a java script file of mine in, which is just a library of functions, nothing runs unless it is called, it doesn't grow at all.
 
I could provide a URL to point to, (outside of this forum) if you would think that would help.  I have no doubt that IE is to blame, but with the accumulation of memory in my full blown app, it will kill the browser eventually.  I have tested from several different machines, but they are all running IE 9 with the most recent service packs.  Some with Windows 7 Pro, one with Vista Ultimate.

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/mgacofzHMI4J.

W.R. Matthiesen

unread,
Feb 14, 2013, 2:37:53 PM2/14/13
to web...@googlegroups.com
I have sent an email with a url to the test page.  In its current state, it is just pointing to fm.min.js.

Anton Venema

unread,
Feb 14, 2013, 2:50:29 PM2/14/13
to web...@googlegroups.com
Got it. What does your raw .aspx content look like?

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



On Thu, Feb 14, 2013 at 11:37 AM, W.R. Matthiesen <wrmatt...@gmail.com> wrote:
I have sent an email with a url to the test page.  In its current state, it is just pointing to fm.min.js.

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/P-20_21Vmb0J.

W.R. Matthiesen

unread,
Feb 14, 2013, 3:17:50 PM2/14/13
to web...@googlegroups.com
This is what the test aspx page looks like. There is nothing but an empty onload with a call to base in the code behind.
 
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestHome.aspx.cs" Inherits="TestHome" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="AC" Namespace="ApprovedContact.Web.UI.WebControls" Assembly="ApprovedContact.Web.UI.WebControls" %>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head id="Head1" runat="server">
    <title>Guest</title>
  </head>
  <body style="margin:0px; padding:0px">
    <form id="form1" runat="server" >

  <script type="text/javascript" src="../Script/fm.min.js"></script> 
<%--  <script type="text/javascript" src="../Script/fm.websync.min.js"></script>    
  <!-- optional extensions --> 
 <script type="text/javascript" src="../Script/fm.websync.returndata.min.js"></script> 
  <script type="text/javascript" src="../Script/fm.websync.subscribers.min.js"></script>
  <script type="text/javascript" src="../Script/jquery-1.8.1.js"></script> 
  <script type="text/javascript" src="../Script/ac.js"></script>   --%>

  <div class="userInformation">
    <div>
      <div>
        <asp:LinkButton ID="username" runat="server" SkinID="none" text="click me" />
      </div>
    </div>
  </div>
  <div style="clear:both;" class="bottompagepad"></div>
  </form>
</body>
</html>

Anton Venema

unread,
Feb 14, 2013, 5:36:38 PM2/14/13
to web...@googlegroups.com
Weird. No leak here with that same code in a new VS project.

Only difference is I didn't include the TagPrefix piece - don't have an ApprovedContact assembly.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/uoBUqVRM0M0J.

W.R. Matthiesen

unread,
Feb 15, 2013, 7:44:00 AM2/15/13
to web...@googlegroups.com
I removed the reference to that assembly, and I still have the growth when I hit my page.
 
So, to be clear, in your own test site, you see none of this.  Have you hit the test url I gave you and seen no growth as well?  Or do you see growth when you hit that?
 
Thanks

Anton Venema

unread,
Feb 15, 2013, 12:10:48 PM2/15/13
to web...@googlegroups.com
Fixed a bug in my reproduction - the leak now shows up. Looking into it.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



 
Thanks

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/wGkolpTvcRcJ.

Anton Venema

unread,
Feb 19, 2013, 2:32:51 PM2/19/13
to web...@googlegroups.com
Still researching this. Every memory leak tool we've tried shows no leaks, but IE undoubtedly leaks. Have you come up with anything on your end?

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



W.R. Matthiesen

unread,
Feb 20, 2013, 7:18:31 AM2/20/13
to web...@googlegroups.com
Unfortunately that is what I see too.  Nothing shows a leak, but memory continues to grow.  And of course, only in IE.  All the other browsers are fine, so it is definitely something Microsoft is doing wrong.

W.R. Matthiesen

unread,
Mar 1, 2013, 7:28:39 AM3/1/13
to web...@googlegroups.com

I have found nothing on my end to change this. Have you had any luck tracking this down?

Thanks

Anton Venema

unread,
Mar 2, 2013, 4:18:43 PM3/2/13
to web...@googlegroups.com
No, not yet. It's a miserable IE bug, but we're still looking into it.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



On Fri, Mar 1, 2013 at 4:28 AM, W.R. Matthiesen <wrmatt...@gmail.com> wrote:

I have found nothing on my end to change this. Have you had any luck tracking this down?

Thanks

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/irvAxj9wE0YJ.

Shane Loret

unread,
Mar 6, 2013, 10:33:36 AM3/6/13
to web...@googlegroups.com
For what it's worth, we are seeing the same thing. We first noticed that IE 9 would just freeze after about an hour being on a websync enabled page. After reading this thread, we watched the memory and it just slowly continue to climb until IE  freezes up. Hopefully you can figure out what is happening.

-Shane

Anton Venema

unread,
Mar 6, 2013, 12:08:56 PM3/6/13
to web...@googlegroups.com
Shane,

That's a different issue.

W.R. is talking about a leak in IE when the page is reloaded. For whatever reason, IE doesn't release memory from the last page load under certain conditions.

What you are describing is a leak within the page itself. Assuming you are using the latest version, there are no memory leaks within WebSync under this scenario. We test this frequently. If you see memory leaking over time as you receive messages, then it is most likely caused by what you are doing with those messages.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/fWc5C7_cma0J.

Anton Venema

unread,
Mar 6, 2013, 12:27:55 PM3/6/13
to web...@googlegroups.com
@W.R., we may have found the cause of the issue. It's a weird one, and I can't guarantee anything yet, but we have our first promising lead. Will update later.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



On Fri, Mar 1, 2013 at 4:28 AM, W.R. Matthiesen <wrmatt...@gmail.com> wrote:

I have found nothing on my end to change this. Have you had any luck tracking this down?

Thanks

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.

Anton Venema

unread,
Mar 6, 2013, 12:37:19 PM3/6/13
to web...@googlegroups.com
Can you try something?

- Open fm.js, and search for: fm.util.observe(window, 'unload', function() { ...
- At the end of the function definition, change "return _results;" to "return;"

It's absolutely ridiculous, but for some reason, this seems to fix the problem when I test over here. Can you confirm?

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



W.R. Matthiesen

unread,
Mar 7, 2013, 7:58:58 AM3/7/13
to web...@googlegroups.com
It is really hard to tell.  I made the change, and once I grew the memory to about 22,500k, it seemed to fluxuate a lot.  Seeming to grow but them sometimes falling again. It is hard to make an exact call when task manager is showing so much change, but my gut interpretation is that it is better. 
 
If that was the only change, and it wouldn't impact the system (of course this looks like it would since it would no longer return that array), I would try it in my app, which grows way more and is easy to tell.
 
Thanks

Anton Venema

unread,
Mar 7, 2013, 11:55:41 AM3/7/13
to web...@googlegroups.com
Go ahead with it. We use CoffeeScript to verify the integrity of our JavaScript client, which works really well, but one of CoffeeScript's quirks is that it adds a return statement if one isn't defined, assuming that there are never any side effects (which is supposed to be true, but apparently is not in IE for window.unload observables).

We saw memory growth stop immediately after making that change. We couldn't get the growth to come back trying with both postbacks and hard refreshes.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



 
Thanks

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/LGCkhaeKIt8J.

W.R. Matthiesen

unread,
Mar 7, 2013, 1:41:22 PM3/7/13
to web...@googlegroups.com
It seems to be working.  In the full blown app, I still see some growth on my worst page, but I will look for something on my end now.
 
Thank you very much.

Anton Venema

unread,
Mar 7, 2013, 1:42:13 PM3/7/13
to web...@googlegroups.com
Very welcome. Thanks for your help and persistence. We'll have this patch included with the next release.

Anton Venema
Frozen Mountain Software
604-227-2458 (Canada)
919-300-5520 (United States)
888-379-6686 (Extension 
102)
www.frozenmountain.com



On Thu, Mar 7, 2013 at 10:41 AM, W.R. Matthiesen <wrmatt...@gmail.com> wrote:
It seems to be working.  In the full blown app, I still see some growth on my worst page, but I will look for something on my end now.
 
Thank you very much.

--
You received this message because you are subscribed to the Google Groups "WebSync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websync+u...@googlegroups.com.
To post to this group, send email to web...@googlegroups.com.
Visit this group at http://groups.google.com/group/websync?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/websync/-/fDgubJC5VpIJ.
Reply all
Reply to author
Forward
0 new messages