Hey there, In the last couple of months, I've been noticing a bit of an irregularity in frame rates, as the AIModel processing load goes up (into the 400+ nr of models). While investigating the New Zealand lock-up bug (see yesterday's post), I found that flightplan processing is scheduled to be executed every 100 ms. Because this execution is triggered from one while loop in the AIManager, flightplan execution has a tendency to synchronize, which I believe is a major contributer to the observed irregularities.
For this reason, I'm working on adding a little bit of randomization into to the execution time, much similar to how the ground elevation code for AIModels is scheduled by a random number. Even if I knock the schedule off by just a few random ms, each time, the statistical properties of the random number generator will cause the flightplan processing time of each AIAircraft to be smoothly distributed across multiple executions of the AIManager::update() function. At this point, I don't see any adverse effects of such randomization, but if there are, please let me know. Cheers, Durk ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel