iWitch Posted April 17, 2014 Share Posted April 17, 2014 As i understand there something like this for chrome version. Or it will work for steam too?Is it possible to see how much time wasted on calling functions, wasted memory etc?Somebody have such experience? I made some custom widget for temperature monitoring and was surprised how often OnUpdate was called if StartUpdating() called. i reduced useless callings when percent/value isnt changed much, but health and sanity indicators have same model of updating. Thats scary me So want to know maybe it reality its cheap operation (in vanilla number showing only when mouse over indicator so its not problem), but mine shows value in any time and first time i saw crazy amount of updates Link to comment Share on other sites More sharing options...
finpig Posted April 18, 2014 Share Posted April 18, 2014 soz guy who asked me for artwork! Link to comment Share on other sites More sharing options...
simplex Posted April 18, 2014 Share Posted April 18, 2014 As i understand there something like this for chrome version. Or it will work for steam too? Is it possible to see how much time wasted on calling functions, wasted memory etc? Somebody have such experience? I haven't used it, but take a look at profiler.lua. It's well documented in the comments at the beginning of the file. But don't stress too much on premature optimisation, that's many a programmer's downfall . I made some custom widget for temperature monitoring and was surprised how often OnUpdate was called if StartUpdating() called. i reduced useless callings when percent/value isnt changed much, but health and sanity indicators have same model of updating. Thats scary me So want to know maybe it reality its cheap operation (in vanilla number showing only when mouse over indicator so its not problem), but mine shows value in any time and first time i saw crazy amount of updates Yes, OnUpdate methods are called very often. Every frame, if I'm not mistaken. That's why components with more expensive update logic use a custom update task via self.inst:DoPeriodicTask() or similar. Link to comment Share on other sites More sharing options...
iWitch Posted April 18, 2014 Author Share Posted April 18, 2014 thx for reply, but maybe you know:game have some kind of optimizations like - if you calling SetTint,SetScale with exatcly same values, game engine will ignore it? Or its cheap operation anyway? Link to comment Share on other sites More sharing options...
iWitch Posted April 18, 2014 Author Share Posted April 18, 2014 and one more question if i change some standart component by adding few variables and OnLoad/OnSave to handle itwill it broke game save if mod will be disabled or deleted in future?or next save (on exit or just new day) will completely destroy them and no problem here? Link to comment Share on other sites More sharing options...
finpig Posted April 18, 2014 Share Posted April 18, 2014 i have no idea? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.