<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 4 Jul 2009, at 08:34, Michał Pasternak wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="PL" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Hi,<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">as you can see here:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.divmod.org/trac/browser/trunk/Nevow/nevow/athena.py#L800" style="color: blue; text-decoration: underline; ">http://www.divmod.org/trac/browser/trunk/Nevow/nevow/athena.py#L800</a>&nbsp; , if incomingMessages is a very, very long list, chances are, that it will block for a small amount of time. Also, if you happen to run the web server interactively, calling a lot of log.msg(…) functions will print out a lot of stuff on the console, which will also take some CPU cycles and GUI resources[1]. I think the best approach would be first to remove lines 803 – 806 (“else: log.msg(…)”) and test if the problem of browser lagging still exists – of course if you run server and browser on the same machine.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">There are some cases, which may lead to accumulation of the messages on client, which then lead to lags on the client side (and a lots of log messages on the server). Those may be bugs in the application code, but I think some of those cases are browser-dependent too (for some code I tested, Google Chrome sent a lot of duplicate messages, while Firefox sent none). Some people say, that duplicate messages phenomenon may be even extension-dependent, as in case of Firefox with FireBug enabled.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Unfortunately, it seems that none of us is able to provide a minimal code sample of described misbehavior. Maybe it would be better just to disable those log messages in the release builds or make them optional?</span></div></div></div></div></span></blockquote><br></div><div>I'll certainly look into this, but I believe that the system causing concern was run without a controlling terminal - and I have a suspicion that the offending log was even removed. The system is IO intensive though (hence using twisted in the first place) and we have had instances in the past of accidentally using blocking calls.</div><div><br></div><div>I'll report back in a few weeks if we get some real tests going.</div></body></html>