r107722 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107721‎ | r107722 | r107723 >
Date:14:28, 31 December 2011
Author:petrb
Status:deferred
Tags:
Comment:
performance fix
Modified paths:
  • /trunk/tools/wmib/Core.cs (modified) (history)
  • /trunk/tools/wmib/Infobot.cs (modified) (history)
  • /trunk/tools/wmib/RClogs.cs (modified) (history)

Diff [purge]

Index: trunk/tools/wmib/Infobot.cs
@@ -400,8 +400,8 @@
401401 while (running)
402402 {
403403 check++;
404 - Thread.Sleep(10);
405 - if (check > 80)
 404+ Thread.Sleep(100);
 405+ if (check > 8)
406406 {
407407 th.Abort();
408408 irc.Message("Search took more than 800ms try a better regex", Channel);
Index: trunk/tools/wmib/Core.cs
@@ -496,11 +496,15 @@
497497 /// <param name="chan">Channel name</param>
498498 public static void handleException(Exception ex, string chan = "")
499499 {
500 - if (config.debugchan != null)
 500+ try
501501 {
502 - SlowQueue.DeliverMessage("DEBUG Exception: " + ex.Message + " I feel crushed, uh :|", config.debugchan);
503 - }
504 - Program.Log(ex.Message + ex.Source + ex.StackTrace);
 502+ if (config.debugchan != null)
 503+ {
 504+ SlowQueue.DeliverMessage("DEBUG Exception: " + ex.Message + " I feel crushed, uh :|", config.debugchan);
 505+ }
 506+ Program.Log(ex.Message + ex.Source + ex.StackTrace);
 507+ } catch (Exception) // exception happened while we tried to handle another one, ignore that (probably issue with logging)
 508+ { }
505509 }
506510
507511 /// <summary>
Index: trunk/tools/wmib/RClogs.cs
@@ -460,7 +460,7 @@
461461 }
462462 }
463463 }
464 - Thread.Sleep(100);
 464+ Thread.Sleep(10);
465465 }
466466 Thread.Sleep(100);
467467 }
@@ -473,7 +473,6 @@
474474 Console.WriteLine(x.Message);
475475 }
476476 }
477 -
478477 }
479478 catch (Exception x)
480479 {

Status & tagging log