Mod Profiler
A little tool to measure the amount of time taken by certain functions run by mods.
(Original prototype made by the jillo, modified by me to have more features and to be able to work without requiring luadebug)
While in game press ‘i’ to toggle the tool on or off, it will have a list of currently running mods on the bottom left and currently running functions on the bottom right.
The mod and function that take the most time to run in the current frame will be added to the lists on the top left and top right.
You can set the minimum time in ms it takes for a callback to be registered (default is 1ms, personally I set mine to 10) by opening the console with ~ and entering "MinFunctionTime X" where X is a number.
By default anything that takes 25ms or more will be full red, with times under that being some gradient of white-red based on how slow they are, you can change this by opening the console and entering "MaxFunctionTime X" where X is the ms cap. (eg if your computer is slow and everything is red you might want to increase the number)
You can set the size of the font by opening the console and entering "ProfilerTextScale X" where X is a number, though it will probably look weirdly pixelated if you use a value other than a multiple of 0.25. (and unless your screen is huge and high-res anything less than 0.5 will probably be unreadable)
GO INTO GAME OPTIONS AND TURN OFF "FILTER" TO SEE THE TEXT
You can press ‘u’ to pause the display update, or ‘y’ to check functions on post update rather than post render.
(as post_render runs twice as often and if you’re trying to detect something happening on post_update it can help to not have post_render functions cutting in)
While the list is paused you can press ‘h’ and ‘n’ to scroll through the list if you want to check something and didn’t pause quick enough.
Keep in mind this mod will add a bit more time to each callback that runs, and will be constantly sorting a table of the running mod callbacks while you have the display on, so you will get better performance if you disable it once you’re done using it to check things (though how much of a difference really depends on how many mods you have running and how many callbacks they add).
Required DLC:
These DLC should be installed in order to use this item.
The Binding of Isaac: Afterbirth
The Binding of Isaac: Afterbirth+
Revisions:
Old revisions of this mod are available below. Click the link to download.