John Lokanis Posted October 30, 2013 Report Share Posted October 30, 2013 LV 2013 added a new function (or just exposed it) that gets the name of a class. I wanted to see if this would be faster than the old method I used before based on the path of the class. So I created a little experiment. It turns out the new functions is MUCH faster. I am concerned that what I am seeing is real, however, and not due to some compiler optimization with the way I created the experiment. So, please if you have a moment, take a look and tell me what you think. (I added code to strip the file extension because that is the use case in my application, but removing that makes little difference.) thanks, -John get class name speed test.vi ps. If you are wondering, I am using this in a logging operation of message system, so improving speed is important since every single message sent will cause this code to execute. Quote Link to comment
hooovahh Posted October 30, 2013 Report Share Posted October 30, 2013 I think your speed test is a little flawed. You shouldn't be updating any UI indicators in states that you want to know how long it takes to execute, because these operations like updating the UI happen asynchronously and can effect the time a state takes to execute in an unpredictable way. I would also recommend removing debugging, and automatic error handling. That being said I still saw a large improvement using the example class you had. I don't have any other classes to test it with at the moment. 1 Quote Link to comment
John Lokanis Posted October 30, 2013 Author Report Share Posted October 30, 2013 Interesting. I just tried removing the indicators outside the frame and turning off debug and error handling. I saw no difference in the absolute speeds or the relative speed factor between the methods. I wonder why you see a difference. Quote Link to comment
mje Posted October 30, 2013 Report Share Posted October 30, 2013 I see about 15x difference. Curious why, I wouldn't expect one. More importantly though the new method returns qualified names. That alone would make me prefer it even if it was slower. Quote Link to comment
Norm Kirchner Posted October 31, 2013 Report Share Posted October 31, 2013 It's real. It's very real. Long story short, the need to have this Max optimized reared it's ugly head for some development happening in the ivory tower and this is the lovely precipitate. This will greatly help the speed future versions of the AQ Lineator deserialization process. So although I don't have the specific data on it, yes, this should be crazy faster. ~,~ 1 Quote Link to comment
John Lokanis Posted October 31, 2013 Author Report Share Posted October 31, 2013 Cool. Now what other speed improvements are lurking under the hood that we don't know of yet? It would be nice to have a list so we could re-factor our code to take advantage of them. Quote Link to comment
mje Posted October 31, 2013 Report Share Posted October 31, 2013 Don't know if this is so much a speed improvement so much as a first implementation. Several of us have been wishing for an efficient way of retrieving the qname of an object's class at run-time, along with a way of getting a default value from a qname. These native implementations make roll-your-own serialization methods way faster. No doubt the hacks AQ had to put in place for his framework led to this, and I for one am very glad to see this bit of functionality-- it was one of the glaring omissions in LVOOP up until now in my opinion. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.