Genew Posted February 26, 2016 Report Posted February 26, 2016 When I purchased 2 of the A2A GA aircraft, I had to write Lua programs to get my GoFlight RP48 buttons to work the audio panels of those aircraft. Now I have 3 separate programs, 1 for each A2A GA plane, and 1 for all of the FSX default planes. The meat of the code is different, some code is common. Each program is about 300 lines of code. My question (for those in the know) is there any performance penalty or benefit of the approach to coding one way or another of these alternatives: Separate Lua program for each plane, loaded by the FSUIPC profile for that plane A single Lua program with the Lua program determining which function to call based on which plane is active A common Lua program which loads another Lua program based on which plane is active. (This is unlikely to be any different than #2 because the common code is so small as to be trivial). So which approach should I use for best runtime performance, or does it matter? I'm using FSX and FSUIPC4.949f on Windows 10 Gene
Pete Dowson Posted February 26, 2016 Report Posted February 26, 2016 When I purchased 2 of the A2A GA aircraft, I had to write Lua programs to get my GoFlight RP48 buttons to work the audio panels of those aircraft. Now I have 3 separate programs, 1 for each A2A GA plane, and 1 for all of the FSX default planes. The meat of the code is different, some code is common. Each program is about 300 lines of code. My question (for those in the know) is there any performance penalty or benefit of the approach to coding one way or another of these alternatives: Separate Lua program for each plane, loaded by the FSUIPC profile for that plane A single Lua program with the Lua program determining which function to call based on which plane is active A common Lua program which loads another Lua program based on which plane is active. (This is unlikely to be any different than #2 because the common code is so small as to be trivial). So which approach should I use for best runtime performance, or does it matter? I'm using FSX and FSUIPC4.949f on Windows 10 In terms of performance, and probably ease of understanding, your simplest would be the one to choose -- i.e. option 1. The other two are just making things more complicated for no good reason. Pete
Genew Posted February 26, 2016 Author Report Posted February 26, 2016 Thanks, Pete. Certainly makes programming & debugging easier. I just wanted to get other opinions on any downside. Gene
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now