SRL Archive - MSI Suggestions

Reduce "Point in Bad Box" frequency


RawringDragon

2011-07-05 13:39:15

This isn't really a feature, more of a performance tweak :P

When running Draynor Willows (and to a lesser degree, GE Yews), when there is no available target (Willow/Yew ) tree (and there are other nontarget trees visible), the script goes haywire and spams "Point in Bad Box" until a new target is found. This is fine, it still works, except it puts a huge strain on the system, bumping up cpu usage to 2-3x the typical. Do you think it would be more efficient to reduce the frequency of Point in Bad Box? It's currently printing that about 10 times a minute, maybe more…

Thanks in advance

masterBB

2011-07-05 13:52:36

I think the CPU usage is not cause of that text printing but because the script is actively searching for a tree.

RawringDragon

2011-07-05 14:06:10

From: masterBB
I think the CPU usage is not cause of that text printing but because the script is actively searching for a tree.


It is indeed. What I meant to say was to reduce the frequency of the searching.

masterBB

2011-07-05 14:13:49

But then you will be slower as the other bots… Which will reduce the amount of logs an hour.

Troll

2011-07-05 14:23:55

Maybe as a option so if some has a bad PC (not saying you do) the script will be kinder to their CPU ?

Yago

2011-07-05 14:33:39

You can actually reduce the debug amount in the MSI form…

RawringDragon

2011-07-05 14:50:19

From: masterBB
But then you will be slower as the other bots… Which will reduce the amount of logs an hour.


I'm running many bots at a time. Reducing this frequency will let the others run at a greater efficiency. I'm just suggesting we reduce it. Unless there is already a built in method…

From: Yago
You can actually reduce the debug amount in the MSI form…


I wasn't aware. This is debug?

NCDS

2011-07-05 15:28:58

Every time it 'spams' the debug box with "Point in Bad Box", MSI is searching to see whether a new tree has popped up yet or not. It says point in bad box because when the same color as the tree your chopping is found on something else, we call it a "bad box" so that box isn't mouse'd over again.

As mentioned before, you could reduce this, however you would be excessively slower than any of the other bots running. I suppose we could add "Slow PC" option of some sort to the new form in the Advanced Settings and implement a couple conditionals to actually slow things down.

The Debug levels that Yago was talking about just adjusts what shows in your debug box. It doesn't effect what the script is actually doing, just what it tells you. ;)

RawringDragon

2011-07-05 15:42:57

From: NCDS
Every time it 'spams' the debug box with "Point in Bad Box", MSI is searching to see whether a new tree has popped up yet or not. It says point in bad box because when the same color as the tree your chopping is found on something else, we call it a "bad box" so that box isn't mouse'd over again.

As mentioned before, you could reduce this, however you would be excessively slower than any of the other bots running. I suppose we could add "Slow PC" option of some sort to the new form in the Advanced Settings and implement a couple conditionals to actually slow things down.

The Debug levels that Yago was talking about just adjusts what shows in your debug box. It doesn't effect what the script is actually doing, just what it tells you. ;)


Ah. I was under the impression that every time it returned the Point in Bad Box it did the entire searching procedure again.

NCDS

2011-07-05 15:47:55

From: RawringDragon
Ah. I was under the impression that every time it returned the Point in Bad Box it did the entire searching procedure again.


It does search the main screen again for a tree every time that is put up in the debug, sorry if my previous post was misleading.

Once I finish the death walking stuff I'll probably stop adding stuff for a little while and focus on efficiency.

Coh3n

2011-07-07 00:40:40

From: Troll
Maybe as a option so if some has a bad PC (not saying you do) the script will be kinder to their CPU ?
I got that idea a while ago and would like to add s feature eventually, but it's not really priority at the moment.

From: RawringDragon
Ah. I was under the impression that every time it returned the Point in Bad Box it did the entire searching procedure again.

No, every "point in bad box" you see are all the bad points. Doesn't search each time it's printed. When this entire thing prints is when it re-searches.

[] -- MSI_FindObjects
[] ---- Point in bad box
[] ---- Point in bad box
[] ---- Point in bad box
[] -- MSI_FindObjects: false
The debug isn't exactly like that, but each time there's the FindObjects headers and footers is when it searches.

However, you're saying your CPU still goes up? In line 428 of Objects.simba you can increase the wait time and see if it makes a difference. Change

Wait(RandomRange(300, 800));
to something like

Wait(RandomRange(1000, 2000));
If that makes a significant difference, I'll add the Lower CPU option to the setup.