Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
1 2 3 4 5 … 18 Next »
How to run heavy tasks without reaching quota ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
How to run heavy tasks without reaching quota ?
27-01-2025, 06:58 PM,
#4
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: How to run heavy tasks without reaching quota ?
Bursts are allowed for a few frames at most, up to 100ms in a single frame. The burst slowly regenerates over frames that don't exceed the normal maximum time.

You can hit the time quota by either:
  • Exceeding the maximum burst in a single frame (i.e. cpuTime() becoming too large).
  • Exceeding the time quota on average over a short sliding window (i.e. cpuAverage() exceeding cpuMax()).

In the event of a large spike (I'm assuming it's IMesh:buildFromTriangles()), you'll need to wait for cpuAverage() to settle down before doing anything overly taxing again, plus you'll want to wait for the burst quota to regenerate.

There's probably additional information that could be exposed to help calculate the exact time, but waiting a second or two between large spikes should be sufficient as a rough starting point.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
How to run heavy tasks without reaching quota ? - by The17thDoctor - 26-01-2025, 11:15 PM
RE: How to run heavy tasks without reaching quota ? - by Person8880 - 27-01-2025, 05:11 PM
RE: How to run heavy tasks without reaching quota ? - by The17thDoctor - 27-01-2025, 06:05 PM
RE: How to run heavy tasks without reaching quota ? - by Person8880 - 27-01-2025, 06:58 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.