mittsu icon indicating copy to clipboard operation
mittsu copied to clipboard

Animation is choppy

Open nurettin opened this issue 6 years ago • 2 comments

Hi, I know this is really obvious, but the animation is choppy even on a machine with very modern specs and a good GPU. I get a little pause every second or so. Is this possible to fix?

I am aware that ruby has a stop-the-world garbage collector, so I tried disabling it with GC.disable before any other code is run, but the result is the same.

nurettin avatar Mar 11 '18 07:03 nurettin

Hi @nurettin. Mittsu is still very un-optimized at this point, and I have yet to do any extensive profiling as of yet. This is something I've been meaning to do once I have some time.

You (and anyone else who wants to) are more than welcome to have a go at finding any low hanging fruit in terms of performance improvements. I'm willing to bet there are plenty 😄

danini-the-panini avatar Mar 11 '18 13:03 danini-the-panini

Hi @jellymann I used ruby-profiler to look through the callgraph, but I haven't found anything that sticks out. Not sure how to interpret the call graph. When I look at the render method, It appears that most of the time is spent calling external functions, which should be ideal. However, 1/3rd of that time is spent calling perform_auto_clear, so that might be the culprit. Does this appear correct so far?

image

profile.callgrind.out.3852.zip

nurettin avatar Mar 11 '18 17:03 nurettin