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 https://forums.kleientertainment.com/forums/topic/35085-profiling-mod/ 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 https://forums.kleientertainment.com/forums/topic/35085-profiling-mod/#findComment-456820 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 https://forums.kleientertainment.com/forums/topic/35085-profiling-mod/#findComment-456854 Share on other sites More sharing options...
iWitch Posted April 18, 2014 Author Share Posted April 18, 2014 (edited) 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? Edited April 18, 2014 by iWitch Link to comment https://forums.kleientertainment.com/forums/topic/35085-profiling-mod/#findComment-456877 Share on other sites More sharing options...
iWitch Posted April 18, 2014 Author Share Posted April 18, 2014 (edited) 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? Edited April 18, 2014 by iWitch Link to comment https://forums.kleientertainment.com/forums/topic/35085-profiling-mod/#findComment-456909 Share on other sites More sharing options...
finpig Posted April 18, 2014 Share Posted April 18, 2014 i have no idea? Link to comment https://forums.kleientertainment.com/forums/topic/35085-profiling-mod/#findComment-457330 Share on other sites More sharing options...
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