Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Programming - Optimization?

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
4/30/2013 2:26:09 PMMYrankxponen before revert after revert
4/30/2013 2:24:39 PMMYrankxponen before revert after revert
Before After
1 The most expensive thing in LUAUI is Chili Framework. Its the top CPU user that you can see when you enable widget profiler. 1 The most expensive thing in LUAUI is Chili Framework. Its the top CPU user that you can see when you enable widget profiler.
2 \n 2 \n
3 Even the most complicated gadget (like OD gadget, ShieldLink) only take like 4% CPU when super busy while Chili Framework will take 21% while idle. 3 Even the most complicated gadget (like OD gadget, ShieldLink) only take like 4% CPU when super busy while Chili Framework will take 21% while idle.
4 \n 4 \n
5 Other things to consider is the LUA garbage collector. I heard jK said ZK's lua might produce like 10Mb of junk each second (the main point is: LUA garbage collector is working hard). Recently jK commited (in Spring) a manually controlled (manually tuned) LUA garbage collector, and jK mentioned that if LUA gc is like a callin then (LUA gc can be profiled and it) took like 45% of entire LUA cpu usage. When LUA gc is disabled then Chili Framework will only take 10% (which is a considerable drop from 21% during idle/at-game-start). So other issue that take CPU usage might be the "invisible" stuff like garbage collecting that clean stuff up in background which is out of our control (unless we actively recycle table and variable IMO). 5 Other things to consider is the LUA garbage collector. I heard jK said ZK's lua might produce like 10Mb of junk each second (the main point is: LUA garbage collector is working hard). Recently jK commited (in Spring) a manually controlled (manually tuned) LUA garbage collector, and jK mentioned that if LUA gc is like a callin then (LUA gc can be profiled and it) took like 45% of entire LUA cpu usage. When LUA gc is disabled then Chili Framework will only take 10% (which is a considerable drop from 21% during idle/at-game-start). So other issue that take CPU usage might be the "invisible" stuff like garbage collecting that clean stuff up in background which is out of our control (unless we actively recycle table and variable IMO).
6 \n 6 \n
7 [quote]I suspect that stuff such as dynamic_avoidance might be ultra expensive since it keeps polling all own units for all nearby units[/quote] 7 [quote]I suspect that stuff such as dynamic_avoidance might be ultra expensive since it keeps polling all own units for all nearby units[/quote]
8 Its okay. Even tho the widget is realllly long, when you look at widget profiler it take less than 1% (which is lower than stuff like icon drawer). 8 Its okay. Even tho the widget is realllly long, when you look at widget profiler it take less than 1% (which is lower than stuff like icon drawer).
9 \n 9 \n
10 All widget that do not Draw stuff usually take really low CPU even when its complicated IMO.