Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / What is Gosu::Window#show_internals?
- - By Naoya Date 2014-11-01 08:29
I've been profiling the game I'm playing around with to check for any performance bottlenecks, and the ruby-prof accused that the Gosu::Window#show_internals is consuming 45%.
I tried to search what this mean but found nothing :/, can anyone help?
Parent - - By jlnr (dev) Date 2014-11-01 12:57
Originally there only used to be Window#show, the C++ function that runs the game's main loop, and which can be safely ignored when looking at a profiler.
However, due to the way exceptions have to be handled and translated across C++ and Ruby, Gosu renames the C++ function to show_internal and defines a new method called show with additional exception handling:
https://github.com/jlnr/gosu/blob/master/lib/gosu/swig_patches.rb

tl;dr it's just Window#show in disguise. :)
Parent - By Naoya Date 2014-11-01 13:26
Hmm I understand,

After all my problem was the map drawing (a lot of tiles), but .record solved my problem right away.

But good to know about the #show_internals, now I know it's ok to ignore it on the profiler results haha.
Up Topic Gosu / Gosu Exchange / What is Gosu::Window#show_internals?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill