>
> Also, I had a brief look at exactly which Nasal timers caused a jitter.
> And the winner is...
> ... well, any. Any Nasal timer, even if it's almost empty, will every
> now and then consume a much larger amount of time than normal.
> Seems to be a general issue with the Nasal execution engine: could be
> triggered by Nasal's garbage collector, which every now and then needs
> to do extra work - and runs within the context of a normal Nasal call.
> It could also be a result of Nasal's critical sections: other threads
> may acquire a temporary lock to alter Nasal data structures - which may
> block the execution of Nasal timers at certain points. Hmm... Best
> practices for debugging a multi-threaded program anyone? :)
>
> Concerning the frequency of the jitter: I guess it isn't related to the
> FDM at all. It's probably just a result of Nasal complexity. The more
> Nasal code is running, the more often/likely garbage collection /
> blocking may occur. Frame rate may also influce it: many Nasal timers
> run at delay 0 (in every update loop).
>
Yeah you are right. After removing every script from the global Nasal
folder, the events subsystem showed it spent 0 ms.
Copying the scripts back to that folder one by one increased the time spent.
Hmm...this problem seems to be unsolvable right now.
If we ported it over to C++ we'd lose the ability to change small things "on
the fly" without compiling over and over again.
We'd also lose good programmers, who prefer Nasal over C++.
Aircraft creation would not be customizable etc etc.
Or maybe there is a way to program in Nasal so that it leaves less garbage,
so that the garbage colletor will be less busy? (maybe use more local
variables)
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel