SRL Archive - S.M.A.R.T.

Smart Optimizations?


YoHoJo

2011-11-12 16:35:15

Any way to make SMART use less resources besides the slider on the right?
Sometimes smart is (looks) laggy even with the slider is all the way up, but other times it is not. And I was just wondering in general if any changes/tweaks can be made to make SMART use less resources. I know nothing about smart's inter workings but I believe it's open source (but not many people are capable/knowledgeable enough to do much :p?)

Could be make it draw/render less stuff, but still have the color be viable to Simba and just not to us? Anything that would help :D.

bevardis

2011-11-12 16:37:13

If in windows, you can do something with priorities on the task manager. Must be java.exe and simba.exe

YoHoJo

2011-11-12 16:38:34

From: bevardis
If in windows, you can do something with priorities on the task manager. Must be java.exe and simba.exe


Yea I'll give that a shit and raise priorities and see if anything changes, don't think it it will though. Changing CPU usage to MAX on Runescape make it snappier and barely even uses that much CPU, I like doing that.

bevardis

2011-11-12 16:41:26

I think you have to turn the priorities down, not up

YoHoJo

2011-11-12 16:43:46

From: bevardis
I think you have to turn the priorities down, not up


Yeah I know, but putting Runescape CPU to high doesn't cause any lag or anything. I think Simba/SMART just are doing everything as optimized as they can. I mean runescape should never lag :p, yet sometimes it does. I set my RS CPU to max because it makes certain things snappier (like when making gatestones thins appear a few ms faster which really makes a difference).

bevardis

2011-11-12 16:44:43

It could also be the graphics card.

YoHoJo

2011-11-12 16:50:03

My computer is completely capable :D.
I think everyone experiences it sometimes, Runescape is just laggy in SMART sometimes.

litoris

2011-11-12 16:52:01

Slider needs to be all the way DOWN to use less resources? :P

YoHoJo

2011-11-12 16:58:01

FPS barely changes resources usage. And I'm not having any problems or anything in particular guys, everything's running great and fine, but it would be nice is SMART could use less , but it's not big deal :].

Yago

2011-11-12 18:43:45

I used to be able to run 10 SMARTs with pure reflection scripts due to the FPS bar. Now I can barely do 2 clients cause of color.

There should be a way you could disable graphics and it actually disable graphics unless Simba calls OCR of findcolorblah… Currently when i disable graphics it keeps the same resources but throws up a black screen.

Harry

2011-11-12 18:52:24

^ It's also because Jagex made the client run like garbage after adding explicit type casting and other "anti reflection" stuff.

Yago

2011-11-12 19:13:35

From: Harry
^ It's also because Jagex made the client run like garbage after adding explicit type casting and other "anti reflection" stuff.


Not really… Beforethe update i could run the same number of Smart i run now with the same color script…

YoHoJo

2011-11-13 19:16:29

Ran 3 scripts last night and even with the slider at all the way up, they still seemed 'laggy'.
But now I've started (the same script) and moved slider all the way up and it looks as smooth as if I were running it on my browser. Why can't it always be this way :/! We need to figure something out on why it lags sometimes and not others.

Coh3n

2011-11-13 23:30:18

I don't think it's SMART, I think it's the client. A LOT of people complained to Jagex about RS being laggy as hell since the bot-nuke update.

Kyle Undefined

2011-11-13 23:37:06

YoHoJo, how many times have you opened and closed SMART when it starts to be laggy? I've noticed that if I open and close SMART without closing Simba about 10 times it starts to become laggy. As soon as I close Simba and reopen, it works fine.

KingKong

2011-11-14 00:37:21

From: Camo Developer
YoHoJo, how many times have you opened and closed SMART when it starts to be laggy? I've noticed that if I open and close SMART without closing Simba about 10 times it starts to become laggy. As soon as I close Simba and reopen, it works fine.


Thats because you aren't freeing the memory used up by SMART. But smart was never laggy for me:spot:

Kyle Undefined

2011-11-14 04:09:49

From: KingKong
Thats because you aren't freeing the memory used up by SMART. But smart was never laggy for me:spot:


Yeah, I know. I was just wondering if YoHoJo was doing that, cause that would make sense. Lol.

YoHoJo

2011-11-14 04:25:10

How do you 'free up the memory'?
Just if I keep closing/opening SMARTs restart simba completely?

kingarabian

2011-11-14 04:59:03

From: YoHoJo
How do you 'free up the memory'?
Just if I keep closing/opening SMARTs restart simba completely?


YoHoJo, never close SMART and restart script if your script fails/errors etc. This just adds up virtual memory that you are not using, thus causing lag. Make sure to restart Simba as well.

Harry

2011-11-14 07:38:55

From: YoHoJo
How do you 'free up the memory'?

You don't, the JVM can't be killed 100% on Windows. You have to restart Simba to free the memory.

Yago

2011-11-14 15:39:09

From: Harry
You don't, the JVM can't be killed 100% on Windows. You have to restart Simba to free the memory.


In irc i believe benny saod he was creating a way to get over this.

Harry

2011-11-14 15:43:41

No, he doesn't. He tried to make a fix but it doesn't work because Windows is garbage.

Killerdou

2011-11-14 16:28:52

You don't have to restart your browser though, so how does that work?

YoHoJo

2011-11-14 16:32:40

From: Killerdou
You don't have to restart your browser though, so how does that work?


I think you do?
Open runescape in browser, log in, do some crap for a minute, log out (all the way or even to lobby). Now leave that tab in your browser open for 6+ hours, and try to login again.

Harry

2011-11-14 16:33:01

Because your browser runs Java as an independent process. Simba does not.

YoHoJo

2011-11-14 16:38:27

So anyways… are there ways to make SMART work better/use less resources?

Can we make it render less stuff (to human eye) but still have Simba recognize colors and stuff?

Harry you seem to semi-know-your-shit about this, look through SMART source and make it sexier!

@Everyone, thanks for tip about restarting Simba after closing out of smart to free up virtual memory!

Harry

2011-11-14 17:13:55

No, I don't know anything, I'm just relaying info I've been told. :p

Wyn

2011-11-20 21:18:18

It's starting to annoy me.

Slide all the way up…Set High on task manager and through rs option Cpu settings.

Still a huge fps lag going on. Gonna keep using the rs normal client. Works fine.

YoHoJo

2011-11-20 21:24:46

Googled some stuff, saw things about Java -xmx settings and stuff.

Basically
Control Panel> Search 'Java'> Click it > Java Tab> View> under 'Runtime Parameters' for the java ver you're using you can use the -xmx command to select the maximum amount of RAM used or something like that.

No clue exactly how/if any of this works, but just google 'java xmx xms' type of stuff and research.

Hmm even official rs forums talks about it, no idea if it even helps yet.

Allocating more memory to Java:

1. Attempt to run RuneScape and you will see a small Java 'Coffee mug' icon appear in the bottom right of the Windows taskbar (the system tray).
2. Right click this icon and select the 'Open Control Panel' option.
3. Select the 'Java' tab on the window that appears. You should see two panes.
4. Select 'View' under the first pane, which will be labelled 'Java Applet Runtime Settings'.
5. You will now see your installed Java versions. In the fourth column (titled 'Java Runtime Parameters') double click and you will have a text entry box.
6. Type -Xmx128m into the box. The 128 part tells Java to use up to 128mb of RAM instead of the default, which is much lower. To allocate more or less, just change the number. It is not recommended to go for any more than 60% of your total RAM!
7. Click Apply and OK, then close your browser (if open) and re-open. Try playing RuneScape!

http://services.runescape.com/m=forum/forums.ws?25,26,406,61969946#memjava1

Wyn

2011-11-21 04:55:53

From: YoHoJo
Googled some stuff, saw things about Java -xmx settings and stuff.

Basically
Control Panel> Search 'Java'> Click it > Java Tab> View> under 'Runtime Parameters' for the java ver you're using you can use the -xmx command to select the maximum amount of RAM used or something like that.

No clue exactly how/if any of this works, but just google 'java xmx xms' type of stuff and research.

Hmm even official rs forums talks about it, no idea if it even helps yet.

http://services.runescape.com/m=forum/forums.ws?25,26,406,61969946#memjava1


I tried this a couple of weeks ago. Threw 300mb into Java and still got the fps lag.

YoHoJo

2011-11-21 05:06:10

Same. :/.
I threw2 gigs lol. Guess that's not the solution. I think it may be something about the way smart is built because obviously on browser it works just fine/smooth. I know nothing about jaba or how smart works though but I wish someone would look into it and try to fix. I want it to run as smooth as in a browser!

Wyn

2011-11-21 05:29:05

My only guess is to fuck with the refresh rate and turn it into a bigger value.

Wyn

2011-11-21 05:35:40

Could always fuck with the method….

Someone lend me there compiler for Smart?


    /**
* Sets a refresh range 0-100, 0 being very slow, 100 being fast
*/
public void setRefresh(int x) {
x = x < 1 ? 1 : x > 100 ? 100 : x;
if (!refreshSlider.getValueIsAdjusting()) {
refreshSlider.setValue(x);
}
if (canvas != null) {
canvas.setRefresh(500 / x - 5);
}
refresh = 500 / x + 20;
}

/**
* Returns a refresh range 0-100, 0 being very slow, 100 being fast
*/
public int getRefresh() {
return refreshSlider.getValue();
}

DaWu

2011-11-21 05:53:52

Are you sure you just havent reopened SMART inside same simba for few times ? Cause memory isnt freed unless u close the whole simba.

oh and, theres command to set SMART memory, I dont think it respects the global settings.
SmartSetMaxJVMMem(768);

Wyn

2011-11-21 06:06:08

From: DaWu
Are you sure you just havent reopened SMART inside same simba for few times ? Cause memory isnt freed unless u close the whole simba.

oh and, theres command to set SMART memory, I dont think it respects the global settings.
SmartSetMaxJVMMem(768);


I restart Simba every-time before re-opening Smart.


Also tried SmartSetMaxJVMMem(800); and that didn't work.

YoHoJo

2011-11-24 05:29:49

This COMPLETELY fixed it for me!
http://villavu.com/forum/showthread.php?p=848708

KingKong

2011-11-24 06:14:47

From: YoHoJo
This COMPLETELY fixed it for me!
http://villavu.com/forum/showthread.php?p=848708


That would explain why some people have laggy SMART and some don't. I never had any lag issues with mine, because i have Java v 6 update 27

moparisthebest

2011-12-01 01:48:10

From: wyn10
I shouldn't need a good machine to run Smart when I can run Rs itself fine maxed out.


Why not? SMART is copying large arrays of pixels to and from your RAM every second (well, multiple times a second, your framerate) whereas if you run RS from your browser it doesn't need to do any of that. Maybe you have slow or buggy RAM (run memtest86+, it's on just about all linux livecds), or a slow FSB, or CPU. They aren't the same program, so the differences between them must be causing your problems. My guess is the copying.