20,741
edits
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
Overall, Nasal has become an important part of FlightGear, and its use has grown significantly over time. Many of the simulator's most complex and advanced features rely on Nasal scripting, and the continued development of FlightGear's addon framework is likely to result in even more use of Nasal in the future. | Overall, Nasal has become an important part of FlightGear, and its use has grown significantly over time. Many of the simulator's most complex and advanced features rely on Nasal scripting, and the continued development of FlightGear's addon framework is likely to result in even more use of Nasal in the future. | ||
Over the years, Nasal has received criticism for its garbage collection implementation, as it has been linked to performance issues in FlightGear. However, this criticism ignores the fact that Nasal is just one part of the FlightGear system, and that other subsystems have also contributed to performance issues and resource leaks in the past. | |||
The real issue is the way that subsystems are executed inside FlightGear, using a form of cooperative multitasking. This means that Nasal's mark/sweep garbage collector will inevitably be triggered at frame rate, which can cause performance issues and stuttering. | |||
Rather than replacing Nasal entirely, a better solution would be to re-architect FlightGear to address these underlying issues. This would involve changing the way that subsystems are executed, potentially using a different approach to multitasking. | |||
Additionally, it would be beneficial to improve the garbage collection mechanism itself, to provide better diagnostics and metrics at runtime. This would allow end-users to more easily understand if certain issues are related to Nasal or the garbage collector, and to troubleshoot and debug performance problems more effectively. | |||
In FlightGear, the Nasal scripting language is used to create scripts that can be run inside the simulator. These scripts are executed via callbacks that are triggered by timers and listeners, which can cause the garbage collector to be triggered in a non-deterministic fashion. This means that the garbage collector may run at different times and in different ways depending on the specific actions and events that are happening in the simulator. | In FlightGear, the Nasal scripting language is used to create scripts that can be run inside the simulator. These scripts are executed via callbacks that are triggered by timers and listeners, which can cause the garbage collector to be triggered in a non-deterministic fashion. This means that the garbage collector may run at different times and in different ways depending on the specific actions and events that are happening in the simulator. | ||