In my years of debugging various performance problems I came across a program called KCacheGrind. The way it visualized and reprented the data to me was very appealing not to mention easy to read so I was curious if something was available for Löve but didn't encounter anything. So I looked further and stumbled on Profiling Lua with KCacheGrind on the Lua-users wiki.
With some little modifications I was able to make it work just fine in Löve (see attached file).
For the windows users out there KCacheGrind also has a precompiled windows binary.
I choose to not alter the io calls in there to the love.filesystem calls with the reason that I or anyone else might also want to use it outside of love.
Its very simple to use just call profiler.start() from which point you want to start the data collecting and profiler.finish() to stop the data collection and write out the collected information.
I did modify the way it saves the file slightly to embed a timestamp of when it finishes the profiling in case of you doing multiple profile sessions in one application run.
Hope this is useful to someone else aside from me
Callgrinding in Löve (Helpful performance profiling utility)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Callgrinding in Löve (Helpful performance profiling utility)
- Attachments
-
- profiler.lua
- Simple yet effective profiling with callgrind output.
- (5.26 KiB) Downloaded 358 times
- monsieur_h
- Citizen
- Posts: 67
- Joined: Tue Oct 30, 2012 4:43 pm
Re: Callgrinding in Löve (Helpful performance profiling util
Necroing this topic to thank you a lot, this tool is neat and straight forward. Nothing to configure, and all useful data at fingertips!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 6 guests