Browser Memory Problem

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Browser Memory Problem

sueD

Hello,

I have a web application run on server tomcat 6 and jdk 1.7. I am using dwr v3.0.0. My application reverse alarms to jsp page more than 30 per second. Only latest 200 alarms displayed on the page. After serveral

hours memory of browser boom and overflow.

 I have used chrome tool and ie 11 tool  to detect memory overflow,

but there is no undestroyed objects and dom objects.

Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

the same thing happened again.

Could you please help or let me known is there something wrong with my application.

Thanks very much.

 

web.xml

    <servlet>

        <servlet-name>dwr-invoke</servlet-name>

        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

        <init-param> 

                 <param-name >org.directwebremoting.extend.ScriptSessionManager</param-name> 

                 <param-value >com.hikvision.www.dwr.DwrScriptSessionManager</param-value> 

              </init-param>

        <init-param>

            <param-name>debug</param-name>

            <param-value>true</param-value>

        </init-param>

        <init-param>

            <param-name>config-1</param-name>

            <param-value>WEB-INF/dwr.xml</param-value>

        </init-param>

        <init-param>

          <param-name>activeReverseAjaxEnabled</param-name>

          <param-value>true</param-value>

        </init-param>

        <init-param>

             <param-name>crossDomainSessionSecurity</param-name>

             <param-value>false</param-value>

        </init-param>

        <init-param>

            <param-name>allowScriptTagRemoting</param-name>

            <param-value>true</param-value>

        </init-param>

        <load-on-startup>1</load-on-startup>

    </servlet>

 

dwr.xml

 

<dwr>

       <allow>

              <convert converter="bean" match="com.hikvision.www.entity.AlarmData"></convert>

        <convert converter="servlet" match="javax.servlet.http.HttpServletRequest"/>

       </allow>

</dwr>

 

java code

 

 

                            Collection<ScriptSession> sessions = Browser.getTargetSessions();

                            if (sessions != null) {

                                   ScriptBuffer sb = new ScriptBuffer();

                                   sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDeviceAlarm:true,").appendScript(

                                                 "time:'" + alarmData.getReceiveTime() + "',").appendScript("deviceAccount:'" + deviceAccount + "',").appendScript(

                                                 "deviceName:'" + deviceName + "',").appendScript("type:'" + alarmData.getType() + "',").appendScript(

                                                 "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) + "',").appendScript(

                                                 "videoChan:'" + alarmData.getVideoChan() + "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() + "',")

                                                 .appendScript("diskNum:'" + alarmData.getDiskNum() + "',").appendScript("stringParam:''").appendScript("})");

                                   for (ScriptSession scriptSession : sessions) {

                                          scriptSession.addScript(sb);

                                   }

                            }

 

test jsp page

 

<%@ page language="java" contentType="text/html; charset=UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html>

<html>

       <head>

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

              <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

              <meta http-equiv="pragma" content="no-cache">

              <meta http-equiv="cache-control" content="no-cache">

              <meta http-equiv="expires" content="0">

              <script type='text/javascript' src="/dwr/engine.js"></script>

              <script type="text/javascript">

                     dwr.engine.setActiveReverseAjax(true);

                     dwr.engine.setNotifyServerOnPageUnload(true);

 

                     var count = 0;

                     var pollAlarmData = {};

                     pollAlarmData.dealAlarmData = function(alarmData) {

                            var content = document.getElementById("content");

                            content.innerHTML = '<p>' + alarmData.time + "  " + alarmData.deviceName + " " + alarmData.type + '</p>' + content.innerHTML;

                            count++;

                            while(count > 200){

                                   content.removeChild(content.childNodes[content.childNodes.length - 1]);

                                   count--;

                            }

                     }

       </script>

       </head>

       <body>

              <div id="content"></div>

       </body>

</html>

                    

Reply | Threaded
Open this post in threaded view
|

Re: Browser Memory Problem

david@butterdev.com
30 times per second?  That seems a bit excessive, do you mean 30 times
per minute?  How long are you running the DWR clock demo before you see
the problem?  Do you see the problem if you do not run dev tools or IE's
debugger?  Have you tried disabling browser plugins/add-ons?

On 2015-06-14 19:48, 董莹 wrote:

> Hello,
>
> I have a web application run on server tomcat 6 and jdk 1.7. I am
> using dwr v3.0.0. My application reverse alarms to jsp page more than
> 30 per second. Only latest 200 alarms displayed on the page. After
> serveral
>
> hours memory of browser boom and overflow.
>
>  I have used chrome tool and ie 11 tool to detect memory overflow,
>
> but there is no undestroyed objects and dom objects.
>
> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and
>
> the same thing happened again.
>
> Could you please help or let me known is there something wrong with my
> application.
>
> Thanks very much.
>
> web.xml
>
>  <servlet>
>
>  <servlet-name>dwr-invoke</servlet-name>
>
>  
> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
>
>
>  <init-param>
>
>  <param-name
>> org.directwebremoting.extend.ScriptSessionManager</param-name>
>
>  <param-value
>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>
>
>  </init-param>
>
>  <init-param>
>
>  <param-name>debug</param-name>
>
>  <param-value>true</param-value>
>
>  </init-param>
>
>  <init-param>
>
>  <param-name>config-1</param-name>
>
>  <param-value>WEB-INF/dwr.xml</param-value>
>
>  </init-param>
>
>  <init-param>
>
>  <param-name>activeReverseAjaxEnabled</param-name>
>
>  <param-value>true</param-value>
>
>  </init-param>
>
>  <init-param>
>
>  <param-name>crossDomainSessionSecurity</param-name>
>
>  <param-value>false</param-value>
>
>  </init-param>
>
>  <init-param>
>
>  <param-name>allowScriptTagRemoting</param-name>
>
>  <param-value>true</param-value>
>
>  </init-param>
>
>  <load-on-startup>1</load-on-startup>
>
>  </servlet>
>
> dwr.xml
>
> <dwr>
>
>  <allow>
>
>  <convert converter="bean"
> match="com.hikvision.www.entity.AlarmData"></convert>
>
>  <convert converter="servlet"
> match="javax.servlet.http.HttpServletRequest"/>
>
>  </allow>
>
> </dwr>
>
> java code
>
>  Collection<ScriptSession> sessions = Browser.getTargetSessions();
>
>  if (sessions != null) {
>
>  ScriptBuffer sb = new ScriptBuffer();
>
>
> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDeviceAlarm:true,").appendScript(
>
>
>  "time:'" + alarmData.getReceiveTime() +
> "',").appendScript("deviceAccount:'" + deviceAccount +
> "',").appendScript(
>
>  "deviceName:'" + deviceName + "',").appendScript("type:'" +
> alarmData.getType() + "',").appendScript(
>
>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +
> "',").appendScript(
>
>  "videoChan:'" + alarmData.getVideoChan() +
> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +
> "',")
>
>  .appendScript("diskNum:'" + alarmData.getDiskNum() +
> "',").appendScript("stringParam:''").appendScript("})");
>
>  for (ScriptSession scriptSession : sessions) {
>
>  scriptSession.addScript(sb);
>
>  }
>
>  }
>
> test jsp page
>
> <%@ page language="java" contentType="text/html; charset=UTF-8"%>
>
> <%@ taglib prefix="s" uri="/struts-tags"%>
>
> <!DOCTYPE html>
>
> <html>
>
>  <head>
>
>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>
>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
>
>  <meta http-equiv="pragma" content="no-cache">
>
>  <meta http-equiv="cache-control" content="no-cache">
>
>  <meta http-equiv="expires" content="0">
>
>  <script type='text/javascript' src="/dwr/engine.js"></script>
>
>  <script type="text/javascript">
>
>  dwr.engine.setActiveReverseAjax(true);
>
>  dwr.engine.setNotifyServerOnPageUnload(true);
>
>  var count = 0;
>
>  var pollAlarmData = {};
>
>  pollAlarmData.dealAlarmData = function(alarmData) {
>
>  var content = document.getElementById("content");
>
>  content.innerHTML = '<p>' + alarmData.time + " " +
> alarmData.deviceName + " " + alarmData.type + '</p>' +
> content.innerHTML;
>
>  count++;
>
>  while(count > 200){
>
>  content.removeChild(content.childNodes[content.childNodes.length -
> 1]);
>
>  count--;
>
>  }
>
>  }
>
>  </script>
>
>  </head>
>
>  <body>
>
>  <div id="content"></div>
>
>  </body>
>
> </html>

Reply | Threaded
Open this post in threaded view
|

Re: Browser Memory Problem

Mike Wilson
Administrator
In reply to this post by sueD
Which browser are you getting the memory problems in? (it is very difficult to avoid this in old browsers like IE6 but modern browsers should be ok)
 
Best regards
Mike Wilson
 
董莹 wrote:

Hello,

I have a web application run on server tomcat 6 and jdk 1.7. I am using dwr v3.0.0. My application reverse alarms to jsp page more than 30 per second. Only latest 200 alarms displayed on the page. After serveral

hours memory of browser boom and overflow.

 I have used chrome tool and ie 11 tool  to detect memory overflow,

but there is no undestroyed objects and dom objects.

Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

the same thing happened again.

Could you please help or let me known is there something wrong with my application.

Thanks very much.

 

web.xml

    <servlet>

        <servlet-name>dwr-invoke</servlet-name>

        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

        <init-param> 

                 <param-name >org.directwebremoting.extend.ScriptSessionManager</param-name> 

                 <param-value >com.hikvision.www.dwr.DwrScriptSessionManager</param-value> 

              </init-param>

        <init-param>

            <param-name>debug</param-name>

            <param-value>true</param-value>

        </init-param>

        <init-param>

            <param-name>config-1</param-name>

            <param-value>WEB-INF/dwr.xml</param-value>

        </init-param>

        <init-param>

          <param-name>activeReverseAjaxEnabled</param-name>

          <param-value>true</param-value>

        </init-param>

        <init-param>

             <param-name>crossDomainSessionSecurity</param-name>

             <param-value>false</param-value>

        </init-param>

        <init-param>

            <param-name>allowScriptTagRemoting</param-name>

            <param-value>true</param-value>

        </init-param>

        <load-on-startup>1</load-on-startup>

    </servlet>

 

dwr.xml

 

<dwr>

       <allow>

              <convert converter="bean" match="com.hikvision.www.entity.AlarmData"></convert>

        <convert converter="servlet" match="javax.servlet.http.HttpServletRequest"/>

       </allow>

</dwr>

 

java code

 

 

                            Collection<ScriptSession> sessions = Browser.getTargetSessions();

                            if (sessions != null) {

                                   ScriptBuffer sb = new ScriptBuffer();

                                   sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDeviceAlarm:true,").appendScript(

                                                 "time:'" + alarmData.getReceiveTime() + "',").appendScript("deviceAccount:'" + deviceAccount + "',").appendScript(

                                                 "deviceName:'" + deviceName + "',").appendScript("type:'" + alarmData.getType() + "',").appendScript(

                                                 "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) + "',").appendScript(

                                                 "videoChan:'" + alarmData.getVideoChan() + "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() + "',")

                                                 .appendScript("diskNum:'" + alarmData.getDiskNum() + "',").appendScript("stringParam:''").appendScript("})");

                                   for (ScriptSession scriptSession : sessions) {

                                          scriptSession.addScript(sb);

                                   }

                            }

 

test jsp page

 

<%@ page language="java" contentType="text/html; charset=UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html>

<html>

       <head>

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

              <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

              <meta http-equiv="pragma" content="no-cache">

              <meta http-equiv="cache-control" content="no-cache">

              <meta http-equiv="expires" content="0">

              <script type='text/javascript' src="/dwr/engine.js"></script>

              <script type="text/javascript">

                     dwr.engine.setActiveReverseAjax(true);

                     dwr.engine.setNotifyServerOnPageUnload(true);

 

                     var count = 0;

                     var pollAlarmData = {};

                     pollAlarmData.dealAlarmData = function(alarmData) {

                            var content = document.getElementById("content");

                            content.innerHTML = '<p>' + alarmData.time + "  " + alarmData.deviceName + " " + alarmData.type + '</p>' + content.innerHTML;

                            count++;

                            while(count > 200){

                                   content.removeChild(content.childNodes[content.childNodes.length - 1]);

                                   count--;

                            }

                     }

       </script>

       </head>

       <body>

              <div id="content"></div>

       </body>

</html>

                    

Reply | Threaded
Open this post in threaded view
|

答复: Re: Browser Memory Problem

sueD

Hello Mike,

 

I ran application on IE11 and Chrome 43. Memory boom quickly and overflow on all  of them.

 

 

发件人: Mike Wilson [mailto:[hidden email]]
发送时间: 2015615 22:56
收件人: [hidden email]
主题: [dwr-users] Re: Browser Memory Problem

 

Which browser are you getting the memory problems in? (it is very difficult to avoid this in old browsers like IE6 but modern browsers should be ok)

 

Best regards

Mike Wilson

 

董莹 wrote:

Hello,

I have a web application run on server tomcat 6 and jdk 1.7. I am using dwr v3.0.0. My application reverse alarms to jsp page more than 30 per second. Only latest 200 alarms displayed on the page. After serveral

hours memory of browser boom and overflow.

 I have used chrome tool and ie 11 tool  to detect memory overflow,

but there is no undestroyed objects and dom objects.

Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

the same thing happened again.

Could you please help or let me known is there something wrong with my application.

Thanks very much.

 

web.xml

    <servlet>

        <servlet-name>dwr-invoke</servlet-name>

        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

        <init-param> 

                 <param-name >org.directwebremoting.extend.ScriptSessionManager</param-name> 

                 <param-value >com.hikvision.www.dwr.DwrScriptSessionManager</param-value> 

              </init-param>

        <init-param>

            <param-name>debug</param-name>

            <param-value>true</param-value>

        </init-param>

        <init-param>

            <param-name>config-1</param-name>

            <param-value>WEB-INF/dwr.xml</param-value>

        </init-param>

        <init-param>

          <param-name>activeReverseAjaxEnabled</param-name>

          <param-value>true</param-value>

        </init-param>

        <init-param>

             <param-name>crossDomainSessionSecurity</param-name>

             <param-value>false</param-value>

        </init-param>

        <init-param>

            <param-name>allowScriptTagRemoting</param-name>

            <param-value>true</param-value>

        </init-param>

        <load-on-startup>1</load-on-startup>

    </servlet>

 

dwr.xml

 

<dwr>

       <allow>

              <convert converter="bean" match="com.hikvision.www.entity.AlarmData"></convert>

        <convert converter="servlet" match="javax.servlet.http.HttpServletRequest"/>

       </allow>

</dwr>

 

java code

 

 

                            Collection<ScriptSession> sessions = Browser.getTargetSessions();

                            if (sessions != null) {

                                   ScriptBuffer sb = new ScriptBuffer();

                                   sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDeviceAlarm:true,").appendScript(

                                                 "time:'" + alarmData.getReceiveTime() + "',").appendScript("deviceAccount:'" + deviceAccount + "',").appendScript(

                                                 "deviceName:'" + deviceName + "',").appendScript("type:'" + alarmData.getType() + "',").appendScript(

                                                 "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) + "',").appendScript(

                                                 "videoChan:'" + alarmData.getVideoChan() + "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() + "',")

                                                 .appendScript("diskNum:'" + alarmData.getDiskNum() + "',").appendScript("stringParam:''").appendScript("})");

                                   for (ScriptSession scriptSession : sessions) {

                                          scriptSession.addScript(sb);

                                   }

                            }

 

test jsp page

 

<%@ page language="java" contentType="text/html; charset=UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html>

<html>

       <head>

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

              <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

              <meta http-equiv="pragma" content="no-cache">

              <meta http-equiv="cache-control" content="no-cache">

              <meta http-equiv="expires" content="0">

              <script type='text/javascript' src="/dwr/engine.js"></script>

              <script type="text/javascript">

                     dwr.engine.setActiveReverseAjax(true);

                     dwr.engine.setNotifyServerOnPageUnload(true);

 

                     var count = 0;

                     var pollAlarmData = {};

                     pollAlarmData.dealAlarmData = function(alarmData) {

                            var content = document.getElementById("content");

                            content.innerHTML = '<p>' + alarmData.time + "  " + alarmData.deviceName + " " + alarmData.type + '</p>' + content.innerHTML;

                            count++;

                            while(count > 200){

                                   content.removeChild(content.childNodes[content.childNodes.length - 1]);

                                   count--;

                            }

                     }

       </script>

       </head>

       <body>

              <div id="content"></div>

       </body>

</html>

                    

Reply | Threaded
Open this post in threaded view
|

答复: Browser Memory Problem

sueD
In reply to this post by david@butterdev.com

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [mailto:[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

Reply | Threaded
Open this post in threaded view
|

Re: 答复: Browser Memory Problem

david@butterdev.com
The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM, 董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 


Reply | Threaded
Open this post in threaded view
|

答复: Re: 答复: Browser Memory Problem

sueD

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

Reply | Threaded
Open this post in threaded view
|

Re: 答复: Re: 答复: Browser Memory Problem

david@butterdev.com
You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM, 董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 


Reply | Threaded
Open this post in threaded view
|

答复: Re: 答复: Re: 答复: Browser Memory Problem

sueD

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

david@butterdev.com
After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM, 董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 


Reply | Threaded
Open this post in threaded view
|

Re: Browser Memory Problem

Mike Wilson
Administrator
In reply to this post by sueD
It doesn't really matter if you choose passive or active mode (polling, streaming etc), choose the one that fits your scenario best. You want to avoid sending 30 requests per second from the browser as that will be bad for performance in all sorts of ways. Transferring 30 events per second packed in a single request is fine. DWR will usually do the right thing and pack events from the server into fewer requests but if you are hacking your own way of polling then you should always verify by looking at the network trace.
 
When it comes to memory and garbage collection there are many different variables involved; browser bugs, intended garbage collection behaviour (the browser may choose to not free data if there is available memory on the computer), browser plugins and developer tools. If I remember correctly we've seen pretty nasty GC bugs in IE6-IE8 that we have not been able to workaround. If you experience problems on these browsers then you should consider refreshing the page at set intervals (may help) or lower the amount of data handled in your application to extend the time until all memory is consumed.
For other browsers it is often one of the other variables that are causing effects and more often than not involves things you installed or configured in your developer environment.
For IE there are reference installations freely available from Microsoft that you can download here:
If you are suspecting memory problems on IE11 then you should download the appropriate virtual machine, not change any settings, and then run the Clock demo until the operating system reports that IE is consuming too much memory.
 
Best regards
Mike
 
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

Reply | Threaded
Open this post in threaded view
|

答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

sueD
In reply to this post by david@butterdev.com

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I don’t think this is a stable memory cost.

May be it’s a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

david@butterdev.com
I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM, 董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I don’t think this is a stable memory cost.

May be it’s a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 


Reply | Threaded
Open this post in threaded view
|

答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

sueD

My IE11 was upgraded from IE8. I’m afraid if there was something wrong with my browser or somen plugins running there.

My windowns 7 is 32bit.

I will find a clear OS and browser to test it again, then tell you about the result.

Thank you for your help.

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015617 9:57
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM,
董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I dont think this is a stable memory cost.

May be its a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

david@butterdev.com
I am running 32 bit Windows 7 as well.  It has been running 40 plus minutes now and unless something unexpected happens there is not an issue with memory usage.  It started out around 24 MB and it is at 21MB now. 

On 06/16/2015 08:29 PM, 董莹 wrote:

My IE11 was upgraded from IE8. I’m afraid if there was something wrong with my browser or somen plugins running there.

My windowns 7 is 32bit.

I will find a clear OS and browser to test it again, then tell you about the result.

Thank you for your help.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 9:57
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM,
董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I dont think this is a stable memory cost.

May be its a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮 件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 

 


Reply | Threaded
Open this post in threaded view
|

答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

sueD

Could you tell me your full version number of IE11?

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015617 10:43
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I am running 32 bit Windows 7 as well.  It has been running 40 plus minutes now and unless something unexpected happens there is not an issue with memory usage.  It started out around 24 MB and it is at 21MB now. 

On 06/16/2015 08:29 PM,
董莹 wrote:

My IE11 was upgraded from IE8. I’m afraid if there was something wrong with my browser or somen plugins running there.

My windowns 7 is 32bit.

I will find a clear OS and browser to test it again, then tell you about the result.

Thank you for your help.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 9:57
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM,
董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I dont think this is a stable memory cost.

May be its a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮 件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

david@butterdev.com
11.0.9600.17843

On 06/17/2015 12:48 AM, 董莹 wrote:

Could you tell me your full version number of IE11?

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 10:43
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I am running 32 bit Windows 7 as well.  It has been running 40 plus minutes now and unless something unexpected happens there is not an issue with memory usage.  It started out around 24 MB and it is at 21MB now. 

On 06/16/2015 08:29 PM,
董莹 wrote:

My IE11 was upgraded from IE8. I’m afraid if there was something wrong with my browser or somen plugins running there.

My windowns 7 is 32bit.

I will find a clear OS and browser to test it again, then tell you about the result.

Thank you for your help.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 9:57
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM,
董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I dont think this is a stable memory cost.

May be its a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮 件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 

 

 


Reply | Threaded
Open this post in threaded view
|

答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

sueD

Same as mine. I uninstalled my IE 11 and tested on IE 10,  the demo worked order, memory consumed about 20M all night.

I will install IE 11 and tested again. If demo worked order, I will test my application again.

The customer may accecpt  application consume large amounts of memory  but memory consume stably, unless application died less than serveral hours.

Thank you for all of you!^_^

 

Best Regards.

Ying Dong

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015617 19:38
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

11.0.9600.17843

On 06/17/2015 12:48 AM,
董莹 wrote:

Could you tell me your full version number of IE11?

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 10:43
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I am running 32 bit Windows 7 as well.  It has been running 40 plus minutes now and unless something unexpected happens there is not an issue with memory usage.  It started out around 24 MB and it is at 21MB now. 

On 06/16/2015 08:29 PM,
董莹 wrote:

My IE11 was upgraded from IE8. I’m afraid if there was something wrong with my browser or somen plugins running there.

My windowns 7 is 32bit.

I will find a clear OS and browser to test it again, then tell you about the result.

Thank you for your help.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 9:57
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM,
董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I dont think this is a stable memory cost.

May be its a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮 件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

david@butterdev.com
I ran it all day today on IE 11 and the memory was around 20M.  One thing to note, before launching IE 11 make sure there are no zombie IE processes.  I did see unstable memory use when there were 3 IE processes - I am not sure why this happens but it is definitely an OS/IE level thing. 

On 06/17/2015 07:07 PM, 董莹 wrote:

Same as mine. I uninstalled my IE 11 and tested on IE 10,  the demo worked order, memory consumed about 20M all night.

I will install IE 11 and tested again. If demo worked order, I will test my application again.

The customer may accecpt  application consume large amounts of memory  but memory consume stably, unless application died less than serveral hours.

Thank you for all of you!^_^

 

Best Regards.

Ying Dong

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 19:38
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

11.0.9600.17843

On 06/17/2015 12:48 AM,
董莹 wrote:

Could you tell me your full version number of IE11?

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 10:43
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I am running 32 bit Windows 7 as well.  It has been running 40 plus minutes now and unless something unexpected happens there is not an issue with memory usage.  It started out around 24 MB and it is at 21MB now. 

On 06/16/2015 08:29 PM,
董莹 wrote:

My IE11 was upgraded from IE8. I’m afraid if there was something wrong with my browser or somen plugins running there.

My windowns 7 is 32bit.

I will find a clear OS and browser to test it again, then tell you about the result.

Thank you for your help.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015617 9:57
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM,
董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I dont think this is a stable memory cost.

May be its a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮 件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>

 

 

 

 

 

 

 


Reply | Threaded
Open this post in threaded view
|

Re: Browser Memory Problem

Mike Wilson
Administrator
In reply to this post by sueD
Did you not see my previous message? :
"There are reference installations freely available from Microsoft that you can download here:
If you are suspecting memory problems on IE11 then you should download the appropriate virtual machine, not change any settings, and then run the Clock demo."
Before going further on any IE11 bug you need to show that you can reproduce it in Microsoft's reference installation. You only need to run the already installed IE in the reference installation. You don't need to install the server in there, just surf to your existing server.
Mike


From: 董莹 [mailto:[hidden email]]
Sent: den 18 juni 2015 03:08
To: [hidden email]
Subject: [dwr-users] 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

Same as mine. I uninstalled my IE 11 and tested on IE 10,  the demo worked order, memory consumed about 20M all night.

I will install IE 11 and tested again. If demo worked order, I will test my application again.

The customer may accecpt  application consume large amounts of memory  but memory consume stably, unless application died less than serveral hours.

Thank you for all of you!^_^

 

Best Regards.

Ying Dong

 

发件人: David Marginian [mailto:[hidden email]]
发送时间: 2015617 19:38
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

11.0.9600.17843

On 06/17/2015 12:48 AM,
董莹 wrote:

Could you tell me your full version number of IE11?

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 10:43
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I am running 32 bit Windows 7 as well.  It has been running 40 plus minutes now and unless something unexpected happens there is not an issue with memory usage.  It started out around 24 MB and it is at 21MB now. 

On 06/16/2015 08:29 PM,
董莹 wrote:

My IE11 was upgraded from IE8. I’m afraid if there was something wrong with my browser or somen plugins running there.

My windowns 7 is 32bit.

I will find a clear OS and browser to test it again, then tell you about the result.

Thank you for your help.

 

发件人: David Marginian [[hidden email]]
发 送时间: 2015617 9:57
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

I downloaded a VM with Windows 7 running IE 11.  I installed Tomcat 6 and Java 1.7.  So far the clock demo has been running for 15 minutes and I am seeing less memory usage now then when I originally started it.  I really think there is something you aren't telling us, or you have something going on on your machine.  Please note this is a brand new, clean VM downloaded from Microsoft.  I will report back in the morning. 

On 06/16/2015 06:52 PM,
董莹 wrote:

I ran clock demo for about 8 hours yesterday. Memory of IE 11 increased from 20MB to 300+MB.  I dont think this is a stable memory cost.

May be its a bug of IE11, but I think web application should  have a hack way to avoid the bug.

I will take more time to gather information about this problem.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 19:33
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Re: 答复: Browser Memory Problem

 

After running all night there is not a memory leak in my configuration.  Chrome is taking up about 5 MB more memory than it was 9 hours ago.  However, I am on Linux and not running the same configuration. 

You haven't shown us proof of the memory issues and don't seem to be providing consistent information.  If the problem exists why did the screen shot you send not indicate a problem?  Why don't you work on gathering more information, when provided I will put more time into this investigation.

On 06/15/2015 10:21 PM,
董莹 wrote:

I’m  running clock demo on IE8 and IE11 together. It is stable on IE8, but increases about 5k per second on IE11.

 

My application receives alarm  from devices(hardisk error, alarm input and so on) and then reverse

to users with device permissions. When alarm display on web page, user can contact with maintenance man or  do something else.

Alarm of device may reported 1 times every 10 seconds, unless devices were repaired. So page updates frequently.

 

Now I’m using passive mode, If I used polling mode and reversed dozens of data per second,  is it better?

 

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:53
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Re: 答复: Browser Memory Problem

 

You haven't proven there is an issue, and my initial tests do not seem to indicate that there is.
We need more/better information.
 
I will report back with my status in the morning (~8 hours from now).  However, after 40 minutes
running (since 8) there does not appear to be an issue, the memory is stable. 

In general, sending updates to one client 30 times per second does not make sense to me.
No user can possibly process that much information.  Do you have a unique use-case that
makes this update frequency make sense?

On 06/15/2015 08:27 PM,
董莹 wrote:

I think 5m increases in 10mins, it grown faster. I will run clock demo for a long while and test it again.

My page updates fequently so much,  so it needs high performance.

Could you have some way to improve performance?

My OS is Windows 7 Professional.

Thanks again.

 

发 件人: David Marginian [[hidden email]]
发 送时间: 2015616 10:03
收件人: [hidden email]
主题: [dwr-users] Re: 答复: Browser Memory Problem

 

The screen-shots you have provided don't necessarily illustrate a problem.  It is normal for the memory to grow in the browser. 
The garbage collector will run when it needs to.  If you are seeing the clock demo eventually lead to a memory error
then sending us a screen-shot of Task Manager when you first hit the page and then again right before the memory
error occurs would be more helpful in proving a leak.  I ran the clock demo for 8+ hours today and did not receive memory errors
and it continued to be responsive (Ubuntu, Chromium 43).  I will run it again all evening and check the memory stats more
closely in the morning.


On 06/15/2015 07:11 PM,
董莹 wrote:

30 times per second. We have several thousands of devices. I didn't ran dev tools or IE's debugger. After memory overflow, I tried to use tools to fix problem and found nothing.

The pictures below shown time and memory use of clock demo on IE11. Memory boom quickly.

I would appreciate it if i could get your help.

 

 

 

 

-----邮 件原 件-----
发件人: [hidden email] [[hidden email]]
发送时间: 2015615 20:33
收件人: [hidden email]
抄送: 董莹
主题: Re: [dwr-users] Browser Memory Problem

 

30 times per second?  That seems a bit excessive, do you mean 30 times per minute?  How long are you running the DWR clock demo before you see the problem?  Do you see the problem if you do not run dev tools or IE's debugger?  Have you tried disabling browser plugins/add-ons?

 

On 2015-06-14 19:48, 董莹 wrote:

> Hello,

>

> I have a web application run on server tomcat 6 and jdk 1.7. I am

> using dwr v3.0.0. My application reverse alarms to jsp page more than

> 30 per second. Only latest 200 alarms displayed on the page. After

> serveral

>

> hours memory of browser boom and overflow.

>

>  I have used chrome tool and ie 11 tool to detect memory overflow,

>

> but there is no undestroyed objects and dom objects.

>

> Also, I run dwr demo "Server Side Reverse Ajax Clock" on server, and

>

> the same thing happened again.

>

> Could you please help or let me known is there something wrong with my

> application.

>

> Thanks very much.

>

> web.xml

>

>  <servlet>

>

>  <servlet-name>dwr-invoke</servlet-name>

>

> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class

> >

>

>

>  <init-param>

>

>  <param-name

>> org.directwebremoting.extend.ScriptSessionManager</param-name>

>

>  <param-value

>> com.hikvision.www.dwr.DwrScriptSessionManager</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>debug</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>config-1</param-name>

>

>  <param-value>WEB-INF/dwr.xml</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>activeReverseAjaxEnabled</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>crossDomainSessionSecurity</param-name>

>

>  <param-value>false</param-value>

>

>  </init-param>

>

>  <init-param>

>

>  <param-name>allowScriptTagRemoting</param-name>

>

>  <param-value>true</param-value>

>

>  </init-param>

>

>  <load-on-startup>1</load-on-startup>

>

>  </servlet>

>

> dwr.xml

>

> <dwr>

>

>  <allow>

>

>  <convert converter="bean"

> match="com.hikvision.www.entity.AlarmData"></convert>

>

>  <convert converter="servlet"

> match="javax.servlet.http.HttpServletRequest"/>

>

>  </allow>

>

> </dwr>

>

> java code

>

>  Collection<ScriptSession> sessions = Browser.getTargetSessions();

>

>  if (sessions != null) {

>

>  ScriptBuffer sb = new ScriptBuffer();

>

>

> sb.appendScript("pollAlarmData.dealAlarmData({").appendScript("isDevic

> eAlarm:true,").appendScript(

>

>

>  "time:'" + alarmData.getReceiveTime() +

> "',").appendScript("deviceAccount:'" + deviceAccount +

> "',").appendScript(

>

>  "deviceName:'" + deviceName + "',").appendScript("type:'" +

> alarmData.getType() + "',").appendScript(

>

>  "action:'" + (alarmData.getAction().equals(ACTIONSTART) ? 0 : 1) +

> "',").appendScript(

>

>  "videoChan:'" + alarmData.getVideoChan() +

> "',").appendScript("alarmInChan:'" + alarmData.getAlarmInChan() +

> "',")

>

>  .appendScript("diskNum:'" + alarmData.getDiskNum() +

> "',").appendScript("stringParam:''").appendScript("})");

>

>  for (ScriptSession scriptSession : sessions) {

>

>  scriptSession.addScript(sb);

>

>  }

>

>  }

>

> test jsp page

>

> <%@ page language="java" contentType="text/html; charset=UTF-8"%>

>

> <%@ taglib prefix="s" uri="/struts-tags"%>

>

> <!DOCTYPE html>

>

> <html>

>

>  <head>

>

>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

>

>  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>

>

>  <meta http-equiv="pragma" content="no-cache">

>

>  <meta http-equiv="cache-control" content="no-cache">

>

>  <meta http-equiv="expires" content="0">

>

>  <script type='text/javascript' src="/dwr/engine.js"></script>

>

>  <script type="text/javascript">

>

>  dwr.engine.setActiveReverseAjax(true);

>

>  dwr.engine.setNotifyServerOnPageUnload(true);

>

>  var count = 0;

>

>  var pollAlarmData = {};

>

>  pollAlarmData.dealAlarmData = function(alarmData) {

>

>  var content = document.getElementById("content");

>

>  content.innerHTML = '<p>' + alarmData.time + " " +

> alarmData.deviceName + " " + alarmData.type + '</p>' +

> content.innerHTML;

>

>  count++;

>

>  while(count > 200){

>

>  content.removeChild(content.childNodes[content.childNodes.length -

> 1]);

>

>  count--;

>

>  }

>

>  }

>

>  </script>

>

>  </head>

>

>  <body>

>

>  <div id="content"></div>

>

>  </body>

>

> </html>