Skip to content
TORNLIFE More

High memory usage (Memory Leak)

Started by Apollyon [445323] on in Bugs & Issues.

16 replies · 217 views · thread synced · 3 days ago · View on torn.com
About this thread

Posts archived: 17 / 17 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
17
Discussion span
→
People posting
7
Likes on archived posts
26
Posts by staff, officers and moderators
5
Authority score
59 / 100
Historical score
46 / 100
Story score
53 / 100
Engagement score
65 / 100

Most-liked replies

Apollyon [445323]

The tests were performed with both TornTools and Tampermonkey enabled and disabled, leading to the same results.

 

It looks like Torn is repeatedly attaching listeners but never removing them

  • Browser: Chrome Version 140.0.7339.81 (Official Build) (64-bit)
  • Operating System: Windows 11 Pro 24H2
  • Hardware: AMD Ryzen 5 5600X 6-Core Processor (3.70 GHz), 48 GB RAM



Findings from Chrome DevTools

  • EventListener objects: Count increases continuously (thousands retained).
  • system / Context and (compiled code): Retained size grows over time.
  • polyfill.min.js: References found holding async tasks (asap, clearImmediate) that never clear.
  • Window / https://www.torn.comretains/ objects globally, preventing garbage collection.

 

 

This strongly suggests a memory leak:

  • Event listeners are attached repeatedly without removal.
  • Asynchronous tasks keep accumulating, blocking garbage collection.


Snapshot 1: Normal memory usage.

Snapshot 2 (after 20–30 minutes):

  • Large growth in EventListener objects.
  • Growth in system / Context and (compiled code).
  • Retained references in polyfill.min.js.

 

 

eugeni [2972386] Admin Staff

Is it happens on any page or only on forum? I assume only on forums because it make the sense to spend so much time on the same page only theme.
What were you doing during the aforementioned 20-30 minutes? I assume you are walking through pages, am I right?

Apollyon [445323]

Its happening on any page, including home page

One of the tests I did walk through pages another only refreshed before conducting the test leading to the same results, can send you the heapsnapshot if you need them

eugeni [2972386] Admin Staff

Probably I misunderstood you. Let's clarify the issue?

  1. You are saying that Torn has memory leaks which affect the players experience by utilizing extra memory, right?
  2. Staying on same page (let's use Home page as reference, with logged in user), even without any actions from user side (no clicks and no key presses), increases memory usage by page (and by browser as it owns the page) with time, right?
  3. To determine the mentioned above you just opened any Torn page, creates Heap Snapshot 1 (by the way, info about EventListener out of screen there), in 30 minutes you created Heap Snapshot 2. right? and just compared snapshots?

 

Apollyon [445323]
  1. Correct, my tabs some times go from 900 to 1.3GB
  2. Correct, High counts of EventListener and VBEventListener (unusually large for a page that should be mostly static).
  3. Correct conducted 2 tests, one with the page static and another navigating to different areas of torn forum included.
eugeni [2972386] Admin Staff

At the moment I can't reproduce the behavior. The only issue I found: used memory increased on changing the page in forum thread (it require walking through 10+ pages in short time). But I did not saw any growing of memory usage with time.

 

How long do you use current browser for playing Torn? Probably some extension affected Torn pages? Or some accumulated data? To verify it: could you please check the behavior under new/clean Chrome Profile (without extensions, cache or any stored data, with default settings and etc.)?

By the way, did you have chance to try to block chats?

Apollyon [445323]

While having chats disabled noticed a big improvement, my laptop seems to have no issues even with chats enabled while my desktop has on average 1GB of memory even on the home page


Chats do seem to be the biggest offender here

b1zon [2504699]

Hi, sorry (not actually sorry) to bump this old(ish) thread but i've been having the same issues exclusively during RWs. I've talked to splent about this multiple times and was unable to find the source of the issue. I've moved to a completely vanilla browser (mozilla) for RWs to no avail. The more lively the war page gets the worse the problem is to the point of BSODs recently. I've got 16gb of ram to play with so it bewilders me that a browser game can eat that much. If there's any additional info i could provide please guide me through how to obtain it. 

Fists [2830940]

I run this all times but I'm on chrome, not sure if my number is normal but like figured having a different number here might be of help? on the home page it's 597MB here it's slightly higher for some reason. 

CloudJumper [1636201]Staff

This issue should now be resolved in beta24. Please check if this is still happening, if you are absolutely certain that this is still happening, please reach out to me so we can troubleshoot the issue. This is a duplicate of this report, I don't mind keeping both reports active for the time being.

 

Thanks!

Mentions: Performance issues with chat 3.0 due to GC