Massive performance issue with ES3

Discussion and help for Easy Save 3
Post Reply
Arde
Posts: 4
Joined: Tue Jan 16, 2024 7:29 am

Massive performance issue with ES3

Post by Arde »

Hello!

I have this massive performance issue related to ES3. I have tried to optimize button but it didn't do anything. I am mainly saving Dictionary's, Lists and
GameObjects in Unity. Unity's profiler says that it generates 30 MB of GC which causes the game have freeze spikes. I Can provide code if needed but deep profiler just showed that the root of problem is in ES3Writer.Save(), pictures attached. Last Picture is without deep profiler to see the effect without it and it is still massive (might look weird but leads Es3 saving as seen from deep profiler).
Attachments
secondEs3Pic.png
secondEs3Pic.png (1.07 MiB) Viewed 1387 times
noDeepProfiler.png
noDeepProfiler.png (118.64 KiB) Viewed 1387 times
firstEs3Pic.png
firstEs3Pic.png (1.05 MiB) Viewed 1387 times
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Massive performance issue with ES3

Post by Joel »

Hi there,

Have you followed the Improving Performance guide?
https://docs.moodkie.com/easy-save-3/es ... rformance/

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Arde
Posts: 4
Joined: Tue Jan 16, 2024 7:29 am

Re: Massive performance issue with ES3

Post by Arde »

Thank you that did indeed solve the issue. Kinda related to Caching and I can make new discussion if you want but how would I go setting multiple save profiles? Is it just creating different file and loading different file to cache. Also how can images be saved to same save file or would it be folder then?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Massive performance issue with ES3

Post by Joel »

It would indeed be a case of creating different files using the filePath parameter of the Easy Save methods.

To save an image to an Easy Save key/value-based file you would need to convert the image to bytes and then save this to a separate key. However, if possible I recommend saving images out to their own file and store the filename in the Easy Save file instead as to not bloat the file.
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply