Skip to content
TORNLIFE More

Performance issues with chat 3.0 due to GC

Started by PMV [1577993] on in Bugs & Issues.

79 replies · 688 views · thread synced · 5 days ago · View on torn.com
About this thread

Posts archived: 80 / 80 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
80
Discussion span
→
Authority score
61 / 100
Historical score
61 / 100
Story score
70 / 100
Engagement score
80 / 100

People posting, likes and official posts are not counted for this thread yet: on threads longer than one page they come from a periodic pass over the archive, which has not covered it.

Most-liked replies

Mentioned in this thread

Faction 42125 ×1 toshykazu [1435333] ×1

PMV [1577993]

Since the last performance issue thread was closed and was requested to make a new thread if it still happens - it still happens.

 

It will happen regardless of what I do, crimes, faction shit, casino, forums, everything. But the easiest way to reproduce it for me:

 

  • Start a RW with another faction
  • Attack. After several attacks, your browser will stop responding randomly every few seconds.
  • Having a few chat windows open makes it happen quicker.

 

Sometimes it takes me 10-15 attacks for it to start, sometimes it kicks off after 2-3. But when it starts, it will continue to freeze randomly until you restart the browser entirely. In a face paced war, this is a killer.

 

To demonstrate the issue, I logged into torn in an incognito window (privacy mode in FF) so the only mod active was ublock origin (and Im sorry, with the state of the internet today, I will not turn off ublock. It is a deal killer.) No other scripts or extensions were active.

 

Then attacked until it started off, started recording then completed one attack. 

 

Profiler link 

 

You can see the garbage collector peg the CPU and stop everything until it collects a whole bunch of data, then it stops and it clears off. Then 2-3 seconds later, it will do it again. Then again. And repeat until I close the browser completely. In the game, this will basically make the browser dead, as I cannot do a single action. 

 

No other site does this. This freezing came with the introduction of chat 2.0, and that was much worse so there is light at the end of the tunnel but as it is now - any extended clash in a war is a straight up no go for me. The only way I could stop it was to block sendbird's domain entirely so chat 2.0 would never load. Then I could war all day no problems. This is now no longer possible with chat 3.0, sadly.

 

This occurs both on Win11 on a 5900X build with edge, firefox, chrome - and my laptop, a 4650U running mint. 

 

Hopefully this helps get to the bottom of this. Please let me know if I can run or submit any more data, I can make it happen pretty much on demand.

Mentions: Grave performance issues with chat 2.0

Jorn [251329]

I've been having performance issues as well since recently, quite sure it coincided with the release of chat 3.0 despite still being on 2.0 myself. 
Excessively high ram and occasional high cpu usage on torn. Browser becomes stuttery. 
Only torn doing that. I now have to close the tab in between usage as its unfeasible to keep it open all day.

nex [2054500]

Clicking through pages with Heasleys Egg Navigator is a sure fire way to trigger this in about 5 minutes with a fresh tab.

Garebear72 [3546064]

Agreed. Using the Egg Navigator, I have had complete frozen browser at least once and unresponsive pages for sometimes up to 15 seconds or more. Something new is going on.

Steppenwulf [2960257]

Yeah I had this problem when 3.0 first came out.  I switched back to 2.0... but now it seems 2.0 has a critical memory leak.  So the game is pretty close to unplayable for me rn.

On 3.0 I get massive CPU spikes whenever a message is received. For me that's usually faction chat - but it's just each and every message.  I think it has to do with the module spamming the chat to all open tabs, but still, sending a little text shouldn't cause all that CPU usage.

nex [2054500]

2.0 always had a critical memory leak, we were told 3.0 didn't have this issue but that was obviously a meat pie.

 

As a temporary measure, once the tab runs out of memory you can close it, watch the Firefox Task Manager (or Chrome equivalent) to make sure it is disposed of as the browser seems to cache the tab for reuse for a couple of seconds, then open a new tab. The new tab should then work fine for a while. Repeat the process once you start getting CPU spikes again.

Steppenwulf [2960257]

Meh.  I need to be able to open a dozen tabs at a time.  It's mostly only a problem when several tabs are open anyway.  Otherwise, I just experience slower page loads on all pages at all times.  So I've not used chat 3.0 unless I've had to... I'm using chat 2.0 rn.

I just don't understand how Ched personally developed chat1.0 and it was better than either of these commercial chats... I realize there was some fatal flaw in chat 1.0 that cause the failure to connect bug... but it seems to me some part of the architecture at least was working better than these two hack systems.

Maybe the real solution is just to have an external chat app (separate from browsers) then you never have to worry about syncing across tabs in the first place... just shrink your browser by the size of the chat app.

nex [2054500]

FYI, you can still disable chat completely in 3.0 using uBlock.

 

Add 

 

https://www.torn.com/builds/chat/*

 

To your custom filters and reload all open Torn tabs.

 

Been using Torn for several hours after doing this. No need to kill the tab every 15 minutes, memory usage is stable around 2-300Mb, everything is smooth and snappy.

 

It's abundantly clear at this point that f**k all will be done to address this issue so it's mail and Discord only going forward.

brutum [1990913]

You have to have absolutely no imagination or idea what you're doing to implement an external chat room used for a 1-on-1 conversation between a customer and a consultant, for 3 minutes, for a game played by thousands of users simultaneously. To use a free IRC that has been working and proven for 30 years would, of course, be foolish ;) For 3 years we will now prove that we are not camels and wait for chat 17.3 beta 8.

Steppenwulf [2960257]

Can IRC be setup so that the torn staff can spy on our conversations?  Cause I think that's a critical feature need for them.

Then there's the whole thing of needing to have a separate window open vs running the thing in the web browser.

ThunderBlitz [2684774]

Might as well just add my own voice to this.  Noticed what felt like my phone's memory being eaten at a ravenous rate over the last few weeks, I'd just be doing usual things - training, crimin', racing, browsing, occasional chatting and suddenly, things would slow down, the app would crash and even my DNS/VPN (used by Blokada) would disconnect (an indication of the RAM being in trouble.)

 

It's a very new issue, one that I've never experienced before on any phone, as I rarely have more than 2 foreground apps open at a time (alternating between them) and, today I suspected it was being caused by Chat 3 after working out the timeline of when it roughly started.

 

I'm also still seeing occasional connection references to 'sendbird.com' in my phone's connection logs, despite not once switching back to Chat 2.d'0h!  While Chat Third Time "Lucky?" is an improvement, it still has some minor stuttering/input lag issues but its hunger for memory is really starting to become a problem for me.

 

 

 

Edit to add that this happens several times a day.

 

Edit 2: I might as well add that when I leave torn in the background for even a few minutes and new chats come through in that time, the boxes often don't update until I either open one of those boxes, or reload the page.  Just like with the previous version.

 

 

nex [2054500]

I'm also still seeing occasional connection references to 'sendbird.com' in my phone's connection logs, despite not once switching back to Chat 2.d'0h!

 

They are still using Sendbird for the back end.

 

The memory leak has been around since the introduction of Chat 2.0, it's possible that it is more pronounced on older hardware and/or that most users don't notice it because they don't keep Torn tabs open for extended periods but rather go to Torn, do their thing and then go elsewhere. And by "extended" period I mean about 20 minutes of constant clicking around, even just in forums.

Steppenwulf [2960257]

Interesting, I don't have a RAM problem with 3.0, but a processor problem.  2.0 does my RAM something nasty if I'm chatting a lot and have several tabs open.  This happens A LOT during wars, as I'm a faction leader and have not only the faction chat going, but also private chats with several members as well.


nex [2054500]

The RAM problem isn't that it takes up all your RAM, but once an individual tab reaches a certain amount of memory used (seems to be 1Gb for me using Firefox, unsure exactly what dictates it) the garbage collector kicks in, which freezes the tab because the CPU maxes out while the garbage collector is running. Once the memory quota is hit, the garbage collector will run every couple of seconds - since it's unable to actually free up memory (pretty much the definition of a memory leak) it's a never ending loop.

 

We know it's the garbage collector because if you run the Firefox profiler during CPU spikes you can see that GC/CC takes up 100% CPU while your tab is frozen.

 

If you're using Firefox you can open More Tools -> Task Manager to see the tabs you have open and their RAM/CPU usage. I'm guessing you'll see that the tabs where your CPU is struggling also have an inordinate amount of memory locked up.

PMV [1577993]

Honestly, it's clear they can't reproduce this or they really don't give a f**k.

 

I really hoped to get at least something like "hey we read this but we can't reproduce it and still trying, could you do X and Y?". Not just... nothing. That's what makes this shit so frustrating.

 

It really can't be just us few with this problem. No amount of disabling stuff, changing browsers, changing operating systems, or even whole ass computers can stop it for me.

LionZA [2296673]

I have seen this exact issue with uBlock Origin Lite on Chrome 137.0.7151.41 (latest). I have also seen similar performance issues if you manually block the js files under https://www.torn.com/js/debug/. I don't know if this is a Sendbird thing or not, but there are definitely issues with page load that go away if you whitelist *.torn.com on uBlock. 

 

EDIT

 

Thought I'd add a bit more detail of the debugging I did in case it is useful. Opening the JS console, I saw a couple of CSP and ERR_BLOCKED_BY_CLIENT error messages related to air.torn.com (which also seems related to some telemetry scripts in the js/debug/ folder?) I tried blocking requests to this domain with Chrome's "network request blocking" feature, but these seemed to make the issue worse. Whitelisting *.torn.com in uBlock instead made page loads responsive again, but opening the console I now see the calls to air.torn.com are failing with a "Failed to load resource: the server responded with a status of 503 ()" error but this does not seem to affect page speed on Chrome Desktop at least

toshykazu [1435333] Admin Staff

Can you try quitting all public channels, like Global, Trade, New Players, and even your Faction chat if it’s active, and see if the performance/load improves?