Page MenuHomeFeedback Tracker

Engine locking when calling callExtension
New, WishlistPublic

Description

The engine basicly locks while it is waiting for a response from the DLL. Server FPS completely plummets. Please run callExtension asynchronously.

Of course, this can be fixed largely with an asynchronous extension, but it would be nice to have this fixed at some point.

Details

Legacy ID
3971936508
Severity
None
Resolution
Open
Reproducibility
Always
Category
Engine

Event Timeline

gdscei edited Steps To Reproduce. (Show Details)Mar 18 2014, 8:42 PM
gdscei edited Additional Information. (Show Details)
gdscei set Category to Engine.
gdscei set Reproducibility to Always.
gdscei set Severity to None.
gdscei set Resolution to Open.
gdscei set Legacy ID to 3971936508.May 7 2016, 6:12 PM

With the recent rise of persistent game-types and scenarios developed on ArmA 3, this can use some love from BI. Please make this happen! :)

There are costs to doing this; many of which will severely _increase_ the complexity modders must deal with.

Current scenario requires the extension programmer to implement asynchronous mechanisms himself.
This is not that hard, with a tiny bit of extra code on the sqf side if you need the return value.
There should be an actual template around for doing this, but noone has made one afaik.
It's been on my todo list for over a year now.

What if multiple scripts asynchronously call the same extension? Now it better be reentrant, which is a different beast from making an extension async, and not so much simpler.
Going further on that line, if there's a resource you want to use across several calls - like database connections - you need multithread synchronization on these. Suddenly your complexity goes through the roof.

Alternatively arma3 would need to make a queue of those calls, and push them after the previous one is finished. Only, how often can it check for that? Because arma, probably every frame. That would require the protocol - and thus sqf side - to do some large amount of packing overhead.

Do we stop the script dead while it's waiting?
That won't really work from non-scheduled code, like (nearly) all of acre.

Most importantly at this point, it would severely break just about EVERY extension - and/or mod using extensions - already made. Counting those who handle the current setup correctly, anyway.

Given all that, I don't think any amount of upvotes will make a difference.