Jump to content
Sign in to follow this  
ArMaTeC

BIKICode Optimisation

Recommended Posts

Better wording

← Older revision Revision as of 01:09, 16 July 2017
(One intermediate revision by the same user not shown)
Line 184: Line 184:
   
 
====The 3ms run time====
 
====The 3ms run time====
A [[Scheduler#Scheduled_Environment|scheduled]] script runs for exactly 3ms before it is put in suspension to be resumed on the next frame, again for another 3ms and so on until the script is finished. The amount of suspension depends on FPS. At 20 FPS the duration of suspension for example is 50ms.
+
A [[Scheduler#Scheduled_Environment|scheduled]] script can only run for maximum 3ms per frame before it is put in suspension to be resumed on the next frame or even later.
 
+
For more information on that see [[Scheduler#Scheduled_Environment|Scheduler]].
This means that if [[Scheduler#Scheduled_Environment|scheduled]] script cannot be completed under 3ms, the execution can stretch for undefined amount of time, subject to engine load, FPS and other [[Scheduler#Unscheduled_Environment|non scheduled]] scripts running at the same time. A while true loop with sleep started in [[Scheduler#Scheduled_Environment|scheduled environment]] therefore has little chance to follow with exact interval.
+
 
+
[[Scheduler#Scheduled_Environment|Scheduled]] scripts always start with slight delay, subject to engine load.
+
   
 
====When am I creating new threads?====
 
====When am I creating new threads?====
   
Using the [[spawn]]/[[execVM]]/[[exec]] commands are creating small threads within the [[Scheduler|scheduler]] for ArmA2 (verification from a BIS DEV for specifics is needed here), and as the [[Scheduler|scheduler]] works through each one individually, the delay between returning to the start of the schedule to proceed to the next line of your code can be very high (in high load situations, delays of up to a minute can be experienced!).
+
Using the [[spawn]]/[[execVM]]/[[exec]] commands are creating small entries within the script [[Scheduler|scheduler]], and as the [[Scheduler|scheduler]] works through each one individually, the delay between returning to the start of the schedule to proceed to the next line of your code can be very high (in high load situations, delays of up to a minute can be experienced!).
   
 
Obviously this problem is only an issue when your instances are lasting for longer than their execution time, ie spawned loops with sleeps that never end, or last a long time.
 
Obviously this problem is only an issue when your instances are lasting for longer than their execution time, ie spawned loops with sleeps that never end, or last a long time.

View the full article

Share this post


Link to post
Share on other sites
Sign in to follow this  

×

Important Information

City Life RPG mod for ARMA 3
Copyright © 2017 City Life RPG. All rights reserved.
Registered with the UK Copyright Service. Registration No: 284659128

Positive SSL on a transparent background ipv6 ready DMCA.com Protection Status