valters-tomsons / Spectabis

A modern PCSX2 Frontend.
https://spectabis.github.io/
GNU General Public License v3.0
114 stars 18 forks source link

Very Ram Hungry #25

Closed RinMaru closed 6 years ago

RinMaru commented 6 years ago

Im not sure if this is an issue or is intended but ive seen this program take up about 2gb of ram. seems a bit much for a frontend

Windows 10 x64 i5 6402P 8GB DDR4 AMD RX 480 4GB

valters-tomsons commented 6 years ago

Never had such a huge ram usage. How many games do you have in your library?

Could you try changing BitmapScalingMode in advanced.ini to options listed here and take a note if memory usage changes?

RinMaru commented 6 years ago

about 140+ games changing image quality will drop it to about 1.7GB

valters-tomsons commented 6 years ago

Never had a library anywhere near that size, but that still sounds way too much.

Could you tell me the size of your Resources/Configs folder? It could be that all the images loaded really do take up that size.

RinMaru commented 6 years ago

145mb

valters-tomsons commented 6 years ago

Could you archive your Resources/Configs folder and upload it somewhere so I can test? Don't worry, it doesn't include any personal information other than game file path.

RinMaru commented 6 years ago

https://drive.google.com/open?id=1bo2cCk-S076OPm_oiDVwHIjRaski7PPd

valters-tomsons commented 6 years ago

Thanks! 2GB indeed!

Looks like there's a memory leak in unmanaged code sections, I'll try to find the cause of it.

Edit: Turns out, the "memory leak" happens when streaming bitmap images. Not sure how to even fix this.

RinMaru commented 6 years ago

Using Minimem seems to clear out some of the leak but it don't always work

Edit: Im no dev or anything but would making a cache file of all the images fix it? sorta like what dolphin does with its game DB

valters-tomsons commented 6 years ago

Issue has been fixed in https://github.com/FaithLV/WPF_Spectabis/commit/ee07b4b3ce520567d761eb0da7f1eceb3804cbda

I have one more idea to improve performance and you should expect an updated release in upcoming days.

Edit: Just for notes, your library now uses around 80Mb.

RinMaru commented 6 years ago

awesome thanks ^^ I look forward to the update

valters-tomsons commented 6 years ago

Here's the update! https://github.com/FaithLV/WPF_Spectabis/releases/tag/1.0.8

RinMaru commented 6 years ago

awesome works like a charm