SRL Archive - RS3 Help

Why does SIMBA use so much memory?


vanlacke

2014-09-22 01:18:05

While I'm compiling my Simba RAM goes up to 300+ MB instantly - even before loading SMART, and stays there indefinitely. It looks like there is too much memory being allocated to function calls or something. MB when it should be kilobytes

I did a bunch of testing and there's just no way that Simba should be using so much RAM, unless I'm missing something. Also, SMART/Simba take up almost the same amount of RAM. What's going on?

Brandon

2014-09-22 01:35:41

Maybe your script has a leak? Simba by itself (no scripts loaded) uses 18mb for me :l

Clarity

2014-09-22 02:51:35

Running a script I'm using 82mb right now. What script are you running?

Justin

2014-09-22 03:06:22

My Simba running 2 scripts

Another Simba just idle (no SMART, just 2 script tabs open)

E: Humm, I just spam-compiled my script…


Compiled successfully in 2734 ms.
Compiled successfully in 2750 ms.
Compiled successfully in 2672 ms.
Compiled successfully in 2890 ms.
Compiled successfully in 2625 ms.
Compiled successfully in 3110 ms.
Compiled successfully in 3516 ms.
Compiled successfully in 2937 ms.
Compiled successfully in 3906 ms.
Compiled successfully in 3281 ms.
Compiled successfully in 4266 ms.
Compiled successfully in 4094 ms.
Compiled successfully in 3375 ms.
Compiled successfully in 4000 ms.
Compiled successfully in 3453 ms.
Compiled successfully in 3453 ms.
Compiled successfully in 4109 ms.
Compiled successfully in 3953 ms.
Compiled successfully in 3656 ms.
Compiled successfully in 3813 ms.
Compiled successfully in 3406 ms.

Comodo

2014-09-22 12:39:58

http://puu.sh/bJsZZ/794ce4ae6d.png 47mb, running 1 script

vanlacke

2014-09-22 15:12:38

From: Clarity
Running a script I'm using 82mb right now. What script are you running?


I'm running my own combat script. It's pretty massive (6-7k lines), and takes ~6 seconds to compile. But why would it use so much memory?

I got rid of a few hundred initializations and it got RAM usage down to ~250mb from ~350mb, and compile time is now ~3.5 seconds. Ehh…

I got my CPU usage down by a lot, but now RAM is the limiting factor. Before I updated SMART, memory usage was significantly less. But, back then it was one process (simba.exe), and now it's two (javaw.exe & simba.exe), and both use almost identical RAM.

Any ideas?

Hoodz

2014-09-22 15:14:43

From: Mikemaladar
I'm running my own combat script. It's pretty massive (60-70k lines), and takes ~6 seconds to compile. But why would it use so much memory?

I got rid of a few hundred initializations and it got RAM usage down to ~250mb from ~350mb, and compile time is now ~3.5 seconds. Ehh…

I got my CPU usage down by a lot, but now RAM is the limiting factor. Before I updated SMART, memory usage was significantly less. But, back then it was one process (simba.exe), and now it's two (javaw.exe & simba.exe), and both use almost identical RAM.

Any ideas?


60-70k lines? i'd like to see that

rj

2014-09-22 15:15:42

From: Mikemaladar
I'm running my own combat script. It's pretty massive (60-70k lines), and takes ~6 seconds to compile. But why would it use so much memory?

I got rid of a few hundred initializations and it got RAM usage down to ~250mb from ~350mb, and compile time is now ~3.5 seconds. Ehh…

I got my CPU usage down by a lot, but now RAM is the limiting factor. Before I updated SMART, memory usage was significantly less. But, back then it was one process (simba.exe), and now it's two (javaw.exe & simba.exe), and both use almost identical RAM.

Any ideas?


Remove the 50000x50000 bitmap from your proggy

vanlacke

2014-09-22 15:32:00

From: hoodz
60-70k lines? i'd like to see that


lol, zeros… i meant 6-7k :P

Enslaved

2014-09-23 00:11:27

post your script or pm it to us, we can have a look for memory issues( pointer logic can get messed up at times with many dynamically changing variables causing a memory leak). dont worry I wont steal it. Havent bothered with RS for a long time :p
edit: also post pc specs

riwu

2014-09-27 08:44:39

So i discovered a leak in simba today:

After some debugging i found out the leak was caused by calling SaveScreenshot(), with the argument being an invalid path (i forgot to remove it after adding for debug previously)

To reproduce the error:

begin
for 0 to 100 do
SaveScreenShot('C:\nonexistent folder\a.png');
end.

I'm running on 64bit simba atm, not sure if 32bit has the problem as well.

Anything in your script that might have something similar?

Brandon

2014-09-27 12:09:24

From: riwu
So i discovered a leak in simba today..


Reproduced this in 32-bit Simba.. Definitely a leak. 1gb ram usage for screen-shotting the desktop 100 times.

Code in question within Simba is: https://github.com/MerlijnWajer/Simba/blob/92078a23f4e9edcf41d0cd4b370e84a21e7001ec/Units/MMLAddon/PSInc/Wrappers/other.inc#L90