tmarenko / mff_auto

Game bot for Marvel Future Fight game.
Apache License 2.0
26 stars 15 forks source link

Memory Optimization #15

Closed dbzdivik closed 3 years ago

dbzdivik commented 3 years ago

Hi,

I think it's time to look into memory consumption while running the Application. It's consuming way too much memory now.

tmarenko commented 3 years ago

Bot consumes around ~170 Mb in idle mode and doubling this value while running a task. So around 350-400 Mb while running.

If it's too much for you then try to edit tesseract's pools here: https://github.com/tmarenko/mff_auto/blob/8799e5b4ce47077b4da896c9c08cecba7424d575/lib/functions.py#L10-L11

Just change both processes values to 1 and tell me if bot is working fine for you and not taking memory too much. This change however will slow down the pasrsing Content Status board process.

After that I can make an optional setting for "slow parsing/less memory" and "fast parsing/more memory", but I need you to check if it's okay and working for you well.

P.S. No another way to reduce memory consumption. Only the Tesseract library is taking so much space.

dbzdivik commented 3 years ago

I don't have issues with 350MB consumption but as for Python and Nox Combine consumes around 1 GB as of nox handler etc. Which automatically detect as a game and increases High power consumption + Reset of other functions Chrome (normally 1GB), Defender (500MB) all combine consume too much Power on the Laptop.

Still, Thanks will try the same and let you know...

BTW do you know if I delete Tesseract Log Folder Bot acts weird and you didn't add a line to check for the same?

tmarenko commented 3 years ago

Have you already tried changing tesseract's pools? Do you need an optional setting for it?

if I delete Tesseract Log Folder Bot acts weird

Yeah there is no check if folder is exists

tmarenko commented 3 years ago

"Low RAM mode" added in https://github.com/tmarenko/mff_auto/commit/0acc82bc879415190785bfe815a4dec0522c80e8 Log folder fixed in https://github.com/tmarenko/mff_auto/commit/c1615827b26bc40152b26f87ae4c86c670ed7cd2

tmarenko commented 3 years ago

Released in https://github.com/tmarenko/mff_auto/releases/tag/0.8.0