Page MenuHomeFeedback Tracker

New SQF command to change sheduler execution time per frame
New, NormalPublic

Description

Hi!

As we know, scheduler gives 3 ms time to spawned scripts per each frame. This is not enough for some cases.

I suggest to add an SQF command which changes this time frame, for instance:
setSchedulerTimeFrame 6; - sets time frame for 6 ms
Or maybe one more command:
runScheduledScripts 6; - Runs scheduled scripts in this frame for 6 milliseconds, available only in unscheduled env.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting
Additional Information

More on my motivation:
I'm running lots of processing for high level AI in a few spawned scripts organized as event queues. This enhancement would be very helpful for me as I would be able to perform more frequent updates of my scripted AIs. Probably there are more use cases for advanced users. Right now the the need to push everything into the fixed 3 ms execution window is a huge limiting factor against using scheduled scripts.

Event Timeline

Sparker created this task.Tue, Nov 5, 5:01 PM
Sparker updated the task description. (Show Details)
dedmen added a subscriber: dedmen.Tue, Nov 5, 5:15 PM

startLoadingScreen does that.
Cannot really do this. We can't just have a script command that lower fps for everyone.

Sparker added a comment.EditedTue, Nov 5, 5:19 PM

startLoadingScreen does that.

Yes except that we can't tell it how much time the scheduler now has for each frame, it's fixed at 50ms which is too much. Also it's not a valid solution for clients with interface.

We can't just have a script command that lower fps for everyone.

Currently nothing stops me from executing something heavy onEachFrame as well, I don't think that this security argument is valid. I assume that such SQF command would have local effect anyway.