The UI for the Resource Usage Monitor for Joplin is a part of the GSoC 2024 project titled Plugin Resource Usage Monitor for Joplin Desktop. This aims to accurately display the near real-time resource usage metrics in the Joplin app for Plugins, as well as help the users and developers to identify resource heavy plugins.
Here is a very rough initial impression of the place where the resource monitor sits.
I think this should be displayed in a separate window so that you can do some actions in the plugin and also monitor current values. Not just total and peak.
If Joplin slows down, I would want to open the monitor ASAP to analyze/kill processes and screenshot graphs if needed. Having the monitor open before Joplin slows down would be even more helpful.
As for opening the monitor, Help > Open Plugin Monitor with a keyboard shortcut would require much fewer clicks, if any.
I tried opening a new window, it seems to work well, however, there is a question -
The Plugin Monitor is like an optional or even unnecessary feature for those who do not use plugins except the default. Also, if we are spawning a renderer process for displaying the plugin monitor, will it be better if I move the pluginMonitor core to another plugin altogether that may be made available for download ?
For now, I think I will implement this as a native feature instead of a plugin, for that purpose, I need to use some package to generate graphs in the UI. I believe I have seen something similar in the forum sometime ago, but couldn't find it by searching. So I wanted to know if there is any package currently being used for graph/chart generation, or if there is any recommendation otherwise.
Do you have any suggestions for the shortcut key? I found that browsers like chrome and firefox use the shortcut Shift + Esc to spawn a process metric window for the individual processes. I was thinking we could use the same, it doesn't conflict with any other accelerator in the app, though I am not sure about the plugins.