H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
205 stars 80 forks source link

Memory leak - linking between ages #1193

Open DamnBriggsy opened 2 years ago

DamnBriggsy commented 2 years ago

Linking between ages gradually increases the memory usage of the game client. This affects OU and H'uru clients. In my test case, I repeatedly linked between Chiso and gomepubnew and watched as plClient.exe consumed more and more RAM. On Linux, it has been reported that this leads to a crash quickly due to Wine's memory constraints. On Windows this may take a lot longer, but I have not managed to crash the client yet.

Hoikas commented 2 years ago

Just for clarification - was this multiple links to and from those Ages, or did you link only once from GoMePubNew to Chiso and back? In that case, memory usage would be expected to increase slightly due to certain registry information about visited Ages not being unloaded. Further, can we get some numbers for the increase?

DamnBriggsy commented 2 years ago

This was multiple links back and forth. Using net.linktoprevage, I bounced between Chiso and GoMePubNew 10+ times. Last night, I attempted this again with a newer build of the client and bounced between Chiso and Veelay 15 times. At the start I had 943 MB of RAM used in Veelay, and at the end I was at 1045 MB.

My results last night were not exactly on par with my first tests, the memory usage did not raise as dramatically as it seemed to before. I think this will require further testing against the OU client as well, and I can't discount some kind of perceptual bias. I'd like to hear more from the Linux users who have been experiencing this, too.

DamnBriggsy commented 2 years ago

Scharminius did a test run with the OU client on linux to demonstrate the issues they've been having:


time from clicking "Explore URU" to arriving in Relto: 50 seconds
time from clicking "Explore URU" to begin of avvie selection screen fadeout: 27 seconds
Arrived in Nexus: 431.3 MiB
time from clicking the Nexus book linking panel to arriving in Nexus: 8 seconds
Arrived in Relto, 2nd time: 529.1 MiB
time from clicking the Relto book linking panel to arriving in Relto: 11 seconds
Arrived in Nexus: 477.4 MiB
Arrived in Relto: 539.0 MiB
Arrived in Nexus: 506.0 MiB
Arrived in Relto: 568.0 MiB

We're still testing, understanding that the OU client isn't the best test case. I'll add more here when we have more info.