Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

API CPU usage

1609869169

Edited 1609869232
Lee
Pro
I've started using API and found they can eat up to 100% of my processing power. I'm using a i5-6500 @ 3.2Ghz. Is it normal for it to hog? Currently, roll20 is so invasive that other programs start to studder or time out.  Are their any know API's that are particularly greedy? Additionally when I start a session in roll20 my prosses manager registers 24 new browser windows being opened, though I see no additional ones on my desk top. Following is a list of APIs that I'm using: Script Library txtBubbles G  HTML Builder G  Welcome Package G  5E Resting in Style G  CombatTracker G  StatusInfo G  GroupCheck ApplyDamage G  Concentration G  Aura/Tint HealthColors G  WildHelpers G  WildShape G  Message of the Day G  5th Edition OGL by Roll20 Companion G  BounceTokens CharacterImporter PaladinAura G  PaladinAura 5E G  TokenCondition G  Roll20 Audio Master
1609870323
Kraynic
Pro
Sheet Author
Does it do the same thing using a private browsing window, or using the other supported browser from whatever you are using now?  The main thing I see when I open up one of my games is an increase in memory usage. I could be wrong, but I thought you weren't supposed to use CombatTracker and StatusInfo together?  I was under the impression that CombatTracker effectively replaced the other and they had some conflicts.  I could very well be wrong on that though.
1609872667
The Aaron
Roll20 Production Team
API Scripter
Kraynic, I think you're thinking of CombatMaster, which is a combination of CombatTracker and StatusInfo, I believe. Lee, API scripts run on a sandbox server in the cloud, they are effectively like a virtual player in your game, so only the result of their execution appears in you local session.  For example, if you have an API script that move tokens around, the processing to calculate which tokens to move and where to move them takes place in the cloud, but the result of moving them, is communicated to your local client, which might cause tokens to move around on your current map and recalculations of your Dynamic Lighting, which could result in increased processing. I would suggest trying your game in an Incognito / Private window, as Kraynic suggested, one without any extensions running, and see if you get similar performance issues.  also verify that you have Hardware Acceleration enabled for your web browser.  You could also disable all the scripts and verify they are actually causing a problem.  The only script in your list that seems like it could have a large effect on your client is BounceTokens, since it will be moving tokens constantly, causing rapid updates in the client.  Having many bouncing tokens would definitely kill performance locally as it is constantly moving and re-rendering the images.
Thanks for geting back to me. I did try making a new campaign with no APIs and roll20 used bout 6% of the CPU (or I guess i should say chrome). You mentioned things like bouncing toekns could kill performance because of re-rendering. Would gif's and dynamic light effect it as well? As for the acceleration, I get up to 30% on my gpu when roll20 is open   
1609891923
The Aaron
Roll20 Production Team
API Scripter
Dynamic Lighting is the primary contributor to CPU utilization for Roll20, and I'd imagine Animations are also pretty costly.  I've not used them too much at this point, but I have seen things being a bit sluggish on some Addons with lots of animated backgrounds (Looking at you, Elven Forest!).
1609893185
Kraynic
Pro
Sheet Author
The Aaron said: Kraynic, I think you're thinking of CombatMaster, which is a combination of CombatTracker and StatusInfo, I believe. I was!  So, those should be fine...
Thanks, I removed animations and Dynamic Lighting. That returned the CPU usage to normal