#3712 Long chat log cripples client (CPU)

open
nobody
None
7
2008-03-06
2008-03-06
No

As the chat log grows in length, adding anything new to it gives rise to a spike in CPU usage. For example just saying 'hi'.

To reproduce this get yourself a low rate lifesteal weapon such as the golden blade. And go hit something big. You will see many heal messages as you lifesteal from the creature. Because the rate is 1 you get these once a turn (3 a second, approx). As the length grows, your CPU usage will go up and up. If you stop hitting and then just say something you see again a spike.

Closing the chat log doesn't help because it's still being written to even when it's closed (btw if you want to test this and close it by clicking the cross, you can open it again with ctrl + L)

The side effect of this bug is that low rate weapons such as the golden blade and chaos dagger are effectively unusable. /me thought they'd been tried out in test server by those who suggested the stats for them .. obviously not for long enough ;)

Possible fixes : firstly check if there's some memory bug or obvious mistake in how the chat log is written to.
If not, then make older messages automatically disappear from log so the length is kept sensible.
as a quick and dirty fix for lifesteal weapons perhaps the 'heal' message shouldn't be written to log at all but just the number popping out of user's head is seen?

Discussion

  • Nobody/Anonymous

    Logged In: NO

    This is a feature per-se.
    A quick fix that I could implement fast would be to limit the log to X message ( X=200 ) so that the older ones are removed.
    A better approach would be to refactor and improve it to support that, clear operation and channels ( that should be added soon as a result of RPEvents working ).

     
  • Nobody/Anonymous

    i like the quick fix u would still see how much u get and wouldent over load your chatlog with +hps

     
  • will scott

    will scott - 2009-02-27

    does the /clear fix this or does it just make it look nice?

     
  • Kimmo Rundelin

    Kimmo Rundelin - 2012-11-24

    This is less of a problem now that the healing messages are not logged by default. The underlying problem is still there though, and can slow down the client if the chat log is long and the the game situation taxes the client (raids). I'd need profiling information about what is making the chat log slow when it's very long (needs a system fast enough to run the client under a profiler normally without any slowdowns). There are a couple of possible bottle necks and some of those may be fixable, others less so.

     


Anonymous

Cancel  Add attachments