I'm hoping some Javascript/ASP.Net gurus can give me some hints here.
我希望一些Javascript / ASP。网络大师可以给我一些提示。
I've written an application which (unfortunately) uses UpdatePanel (yes, I'm aware that was a dumb idea, too late now though, I understand it more now - even though its an intranet site I'm having troubles with it)
我已经编写了一个应用程序(不幸的是)使用UpdatePanel(是的,我知道这是一个愚蠢的想法,但是现在太晚了,我现在已经更了解它了——尽管它是一个内部网站点,我对它有问题)
The site is a web based timesheet site, kind of tabular format. Anyhow, it basically saves everything in it in an update panel, and autosaves once a minute. This seems to work fine for me, but I use firefox. Other users with more timesheet entries, and IE7 have problems with IE memory usage increasing and their browser slowing down.
这个网站是一个基于网络的时间表网站,类似表格格式。无论如何,它基本上是将所有内容保存在更新面板中,并且每分钟自动保存一次。这对我来说似乎没问题,但我用的是火狐。其他有更多时间表的用户,IE7也有IE内存使用量增加和浏览器速度减慢的问题。
I ran Sieve (checks for memory leaks on a website) and it was pretty obvious it was bad: alt text http://rodh.org/images/Programming/sievemain.png
我运行筛子(检查网站上的内存泄漏),很明显它是不好的:alt文本http://rodh.org/images/Programming/sievemain.png
Thats my site loaded up and left running for a bit, refreshed it at the dip and left it and you can see once a minute it jumps up a little bit. THe area on the timeline before the dip was when i was hitting the save button a bit, so its obvious what is causing it. The DOM nodes and memory both go up.
这是我的站点加载并保持运行了一段时间,在下降时刷新它,然后离开它,你可以看到它每分钟跳一下。在倾斜之前的时间轴上的区域是我按下保存按钮时的区域,所以很明显是什么导致了它。DOM节点和内存都增加了。
I'm using a ScriptManager.RegisterClientScriptBlock's (mainly to get the clientID's of controls so I can do javascript totals) and also a ScriptManager.RegisterStartupScript on page_load to get set the focus to be the same after a partial postback. Maybe they are contributing?
我使用ScriptManager。RegisterClientScriptBlock的(主要是为了获得clientID的控件,这样我就可以执行javascript总数)和一个ScriptManager。在page_load上注册startupscript,以便在进行部分回发后将焦点设置为相同。也许他们的贡献吗?
Is there any tools that can help me out further to this? Sieve reported alot of empty divs being made when the postback occurs? bit I've never used sieve before so maybe this always happens? alt text http://rodh.org/images/Programming/sievnodes.png
有什么工具可以帮助我解决这个问题吗?当回发发生时,筛网报告有很多空的divs ?我以前从未用过筛子,所以这可能经常发生?alt文本http://rodh.org/images/Programming/sievnodes.png
Is there some sort of code analysis I can do, or something that at least lets me see the new DOM nodes created each time...
我是否可以做一些代码分析,或者至少让我看到每次创建的新DOM节点……
I'm thinking hte problem might be to do with my code behind hackery to get the client id's, it stores them in an array, and then recreates taht array on each postback, perhaps something is going wrong there? I've uploaded my JS file which does that hackery, and also the code behind in case anyone needs more info. http://rodh.org/images/Programming/javascript.txt http://rodh.org/images/Programming/codebehind.txt
我认为hte的问题可能是用我的代码来获取客户id,它将它们存储在一个数组中,然后在每个回发中重新创建taht数组,可能有什么地方出错了吗?我已经上传了我的JS文件,它可以进行黑客攻击,同时也上传了代码,以防有人需要更多信息。http://rodh.org/images/Programming/javascript.txt http://rodh.org/images/Programming/codebehind.txt
So I guess my question is: - Can anyone think of anything immediately that would be causing this? - what are some common causes of increased DOM usage on UpdatePanels (using Jquery too btw) - what tools can I use to debug?
所以我想我的问题是:-谁能马上想到会导致这种情况的事情?-在UpdatePanels上增加DOM使用的常见原因是什么(顺便说一下,也是使用Jquery) -我可以使用什么工具进行调试?
1 个解决方案
#1
4
I can tell you first hand Microsoft knows about the IE problem(KB 2000262) with UpdatePanels. Its a DOM parser issue. I had a site that ran fine up until a certain page content size and then IE(all versions) had a fit. FF and other browsers handled the same pages with ease.
我可以直接告诉你,微软用UpdatePanels了解IE问题(KB 2000262)。这是一个DOM解析器问题。我有一个网站运行得很好,直到有一个特定的页面内容大小,然后IE(所有版本)有一个适合。FF和其他浏览器可以轻松地处理相同的页面。
Things I did to make my pages faster:
我所做的事情使我的页面更快:
- Use UpdateMode=Conditional wherever possible
- 尽可能使用UpdateMode =条件
- Implement the KB 2000262 fix
- 实现KB 2000262修复
UpdatePanel Async Postsback slow in IE…Part 3
在第3部分中,UpdatePanel Async Postsback缓慢。
#1
4
I can tell you first hand Microsoft knows about the IE problem(KB 2000262) with UpdatePanels. Its a DOM parser issue. I had a site that ran fine up until a certain page content size and then IE(all versions) had a fit. FF and other browsers handled the same pages with ease.
我可以直接告诉你,微软用UpdatePanels了解IE问题(KB 2000262)。这是一个DOM解析器问题。我有一个网站运行得很好,直到有一个特定的页面内容大小,然后IE(所有版本)有一个适合。FF和其他浏览器可以轻松地处理相同的页面。
Things I did to make my pages faster:
我所做的事情使我的页面更快:
- Use UpdateMode=Conditional wherever possible
- 尽可能使用UpdateMode =条件
- Implement the KB 2000262 fix
- 实现KB 2000262修复
UpdatePanel Async Postsback slow in IE…Part 3
在第3部分中,UpdatePanel Async Postsback缓慢。