Old 03-26-2023, 12:21 PM   #1
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default Should I avoid running too many scripts in background?

I noticed that over time I add more and more scripts to my custom Reaper startup action, which run in the background and do some nice things for me.

Currently I am at 8 running scripts which my projects usually load with (but this number is likely to keep increasing):



I am not noticing any change in performance or hickups yet, but I am wondering, can this become a problem if too many such scripts are running in the background simultaneously? Should I limit myself to a certain number or are these processes usually lightweight and unlikely to cause problems even if they add up (unless poorly coded obviously)?
Phazma is offline   Reply With Quote
Old 03-26-2023, 12:45 PM   #2
WarrenG
Human being with feelings
 
WarrenG's Avatar
 
Join Date: Jan 2020
Location: In the studio at my desk
Posts: 365
Default

I didn't notice anything odd, but the CPU load did go up.

W
WarrenG is offline   Reply With Quote
Old 03-26-2023, 01:06 PM   #3
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default

How many scripts are you running? And by how much did the CPU load change?

Turning off my 8 scripts I don't see an apparent change in the Reaper CPU meter.

I am curious, how such scripts compare to plugins in terms of resources. Is it typically like loading an EQ, which you can load a hundred on most modern machines and it still runs?

I am aware that this depends on the script in question but usually script devs try to make them as light as possible or otherwise mention that they are resource heavy.
Phazma is offline   Reply With Quote
Old 03-26-2023, 01:22 PM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,107
Default

Having defer (background) scripts running itself is very leightweight according to Justin (more info from the devs in that thread), so it (obviously) boils down to how heavy the work is the scripts are actually doing.
nofish is offline   Reply With Quote
Old 03-26-2023, 02:09 PM   #5
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default

Ok thanks for the information nofish.

To my layman's understanding most of these scripts don't constantly do things but only check at defer rate if a situation arises that calls for a certain action and if so perform this action once and then keep checking.

So if that constant checking for specific conditions doesn't take a lot of processing power and it boils down to the actual action that happens when the condition is met, I guess it is almost indifferent to to running such an action manually once.

So to sum it up, if I got this right, I can run even a hundred background scripts simultaneously without too big of an impact, if they don't do intensive tasks all at the same time.
Phazma is offline   Reply With Quote
Old 03-26-2023, 02:23 PM   #6
WarrenG
Human being with feelings
 
WarrenG's Avatar
 
Join Date: Jan 2020
Location: In the studio at my desk
Posts: 365
Default

To clear the load did go up but only by a few percent. It may have been added metering graphics, not sure. But not anything I worried about. I guess I could just run a lua from the toolbar that has all the scripts required at the time. I had only about six running total with no issues at all and it only increased load by approximately 3 percent.
WarrenG is offline   Reply With Quote
Old 03-27-2023, 12:40 AM   #7
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,628
Default

Depending on the workload of each script individually, you can run up to thousands on slower systems.
I once checked.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 03-27-2023, 01:14 AM   #8
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default

Quote:
Originally Posted by WarrenG View Post
To clear the load did go up but only by a few percent. It may have been added metering graphics, not sure. But not anything I worried about. I guess I could just run a lua from the toolbar that has all the scripts required at the time. I had only about six running total with no issues at all and it only increased load by approximately 3 percent.
Yeah moving graphics are in fact a bit taxing. I have a bunch embedded analyzer jsfx on my default project master track and they indeed make a difference of 2-4% CPU on my system according to Reaper’s performance meter.
Phazma is offline   Reply With Quote
Old 03-27-2023, 01:16 AM   #9
Phazma
Human being with feelings
 
Join Date: Jun 2019
Posts: 2,875
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Depending on the workload of each script individually, you can run up to thousands on slower systems.
I once checked.
That’s great to know, thanks for the info.

I guess if I need to add more scripts I will just do so without overthinking it unless I notice them impacting the performance.
Phazma is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.