Skip to content

Conversation

@Lpsd
Copy link
Member

@Lpsd Lpsd commented Mar 5, 2025

I noticed the client memory was increasing by 5-10MB every time I reconnected to a local server with no resources running.

Turns out we were not deleting the XML node and file handle in CServerCache::StaticSaveServerCache all this time :)

Noticed the same in CServerCache::LoadServerCache too, which only runs once - but enjoy the extra memory! Think of all the assets you can fit into 7MB!

For context, the "7MB" reduction in memory won't be 7MB for every client. That value is based on the overall size (how many entries) of the client's MTA/config/servercache.xml. For reference I have 506 server entries (from all the years playing MTA, I guess?), which when converted to the TiXml attribute instances takes up around 7MB in memory.

image

image

@Dutchman101 Dutchman101 merged commit e347659 into multitheftauto:master Mar 5, 2025
6 checks passed
MTABot pushed a commit that referenced this pull request Mar 5, 2025
@Dutchman101 Dutchman101 added this to the 1.6.1 milestone Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants