User talk:Hvengel: Difference between revisions

Jump to navigation Jump to search
Line 1: Line 1:
== Spinner animation ==
== Spinner animation ==


Line 19: Line 20:


[[User:Hvengel|Hvengel]] ([[User talk:Hvengel|talk]]) 16:16, 12 July 2014 (UTC)
[[User:Hvengel|Hvengel]] ([[User talk:Hvengel|talk]]) 16:16, 12 July 2014 (UTC)
:: "When you use XML you are relegating things to either the FDM or to FG itself which will generally be more efficient and "safer" than rolling your own Nasal and much of this will actually happen in C++ space.  Also if you do this using FDM XML you take this out of the main loop which is generally a good thing."
: This is not true – FDM is still inside the main loop (anything that accesses the property tree is inside the main loop). In fact it would be less efficient (theoretically) to put animation code into the FDM because it's updated unnecessarily – animations are only evaluated each frame. (Direct output of surface position is fine, but processing it doesn't have to be in the FDM.) It's not like adding a small Nasal operation for an animation would have any performance penalty at all – even on the most outdated hardware imaginable. But then again, it'll just be a small difference normally – hardly even 1/10th of a ms.
: Emilian: while I agree that the Extra-500 is really slow for me as well, how well it performs is not relevant to this discussion. The Nasal used there is more comparable to "500+600+700+... lines of Nasal code adding up" than "5+5+5+... lines of Nasal code adding up" – because 5 lines of Nasal code takes up no time at all (unless it calls expensive functions and/or uses recursion and/or loops, which the Extra-500 certainly uses some of). The Extra-500 is really complex (as far as I understand it) and is subject to different issues, issues which don't affect small scripts (i.e. 5-liners). Some of the lack of efficiency is not even Nasal code, it's hard coded (e.g. the props.Node interface, which doesn't use cppbind and thus can create unnecessary temporary GC-able objects if used incorrectly). Some of it is the lack of efficiency in the Extra-500's code versus what being accomplished – i.e. it could be much simpler in places (and actually use MapStructure). Some of it is the positioned queries – those are not microscopic yet, but probably will be soon. Et cetera. There's different ways we could prove it's inefficient code. Nasal itself, however, is very efficient from what I've seen and simple animations are not time-wasters at all. Even 100 lines of simple Nasal animations should execute in under ~2-4ms, I would guess, on reasonably modern hardware if it doesn't use certain constructs (e.g. props.globals.getNode("").setValue/getValue, where the node isn't cached, see [http://forum.flightgear.org/viewtopic.php?f=30&t=22155#p201370], or other GC nightmares). Even GC'ing is extremely fast on my computer :-). [[User:Philosopher|—Philosopher]] ([[User talk:Philosopher|talk]]) 13:55, 14 July 2014 (UTC)


== Ubershader Issues ==
== Ubershader Issues ==
395

edits

Navigation menu