sirhamsteralot / HaE-PBLimiter

Profiles pb's and damages them when their runtime goes over a set value
MIT License
11 stars 5 forks source link

Change to the PB kill order #9

Closed jturp closed 5 years ago

jturp commented 5 years ago

As I understand it, the way the limiter decides which PBs to kill when the admins have it set to a "per player" limit is just to kill the last added PB(s) until the combined average drops below the set threshold. The issue with this is that it can harm scripts that are sim-friendly in the course of its duties. Like the scenario below:

First-placed PB: Running floor plan script - sim killer Second-placed: Does a simple echo of battery status on a screen Third-placed: Does a few mathematical computations to show stopping distance on a screen ... ... Nth-placed: Returns from Main()

The limiter will kill every single PB since the first-placed PB is running the sim-killing script as their combined total exceeds a limit.

Proposed solution / request: Change the kill order to kill the slowest script(s) first, then make its way through the list that way until the average drops below the acceptable threshold.

sirhamsteralot commented 5 years ago

Implemented in commit https://github.com/sirhamsteralot/HaE-PBLimiter/commit/ed0b7368184f895d0029b0baeb82288819c61572 , will go out next patch.

sirhamsteralot commented 5 years ago

Released