JosefNemec / Playnite

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
https://playnite.link
MIT License
9.58k stars 508 forks source link

Add timing statistics for each event used by plugins / extensions to be able to identify slow performing ones #2093

Open joyrider3774 opened 4 years ago

joyrider3774 commented 4 years ago

Check for existing issue none

Describe the solution you'd like I've noticed after installing a bunch of plugins that browsing through my gamelist is getting really really slow currently there does not seem to be any way to get profiling info about how long each event in a plugin / extension takes when called. Remember start time and and compare it to the end time of when an event in a plugin / extension happened and log this info in a log file if a certain setting is enabled. This would let plugin / extension authors debug their code more to find slow performing event calls. It would also let users find out which plugins are causing the delays in the playnite app when browsing games. Currently the only way to do it is to disable a plugin one by one and restarting playnite each time until you might have indentified a plugin that is causing a slowdown but this is not very correct and subjective having some sort of timing statistics build into playnite would be better, more detailed and an official way to identify slow performing plugins / extensions causing a delay

Screenshots none

JosefNemec commented 3 years ago

This should get higher priority since I'm seeing increased number of reports related to performance, which are caused by extensions.

We should also automatically display warning messages to users if we detect that certain methods take longer than reasonable.