Jump to content
Sign in to follow this  
taguilo

Nav hold not possible with XML gauge

Recommended Posts

Hi Rob,Comments and whitespaces don't affect a program's performance no matter the language it is written in (read C++,VB XML,etc) as they are automatically ignored on code loadup; so you may "comment" an entire paperback inside a gauge and fps won't drop a bit!:-) though the gauge loading time will increase as you already stated. My point was refered to limit the use of too much branching and nested conditionals (if..els..&& etc) that DO affect the system's performance, when speaking of programs with tenths of thousands of code lines. I am not sures if this may apply to XML efficiency though.For instance, let's compare these pieces of code:(A) 1 > (:( 5 < && if{ 1>XX } els{ 0>XX }(A) 1 > (:( 5 < && >XXIn the first case we have one jump and two extra bytes in memory. A jump is needed to get the "1" or "0" byte, each of one holds its own memory position. In the second case, we don't need a jump as the resulting byte is stored in the XX memory position, then we don't need the "1" and "0" bytes as well. Hypotetically I mean, multiply this basic example to the entire gaugeset of a panel and you should have to find some kind of increased performance. The point is, is it worth in XML? I really don't know; actually I prefer, like you, to make the code more readable, although trying to use "shortcuts" whenever I can providing I will understand the meaning when I need to come back to it:-)Maybe a programming guru can enlighten us a little bit...( or better, is willing to make the proper testings:-) )Regards,Tom

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...