Only memoized functions that were more likely to get the same parameters
Only used memoized functions in places that were more likely to use the same parameters
This did not include any of the artist functions since the qTip gets saved in memory
Adjusted the memoized getJSON function to use the new memoize key generator
I could have also memoized the timeToAgo and formatBytes, but I considered it unlikely that there would ever be an instance where they would get the same parameters.
@7nik I was also thinking that the menu created by showSettings could be kept in memory like the artist qTips are instead of being built each time the settings menu gets called, but I'll leave that to a separate PR/commit. You can do it if you want, or I can do it if you want me to.
As per the conversation with @7nik on Discord, I removed the memoized noIndent function and instead added caching to the artist and translated tag elements.
I could have also memoized the
timeToAgo
andformatBytes
, but I considered it unlikely that there would ever be an instance where they would get the same parameters.@7nik I was also thinking that the menu created by
showSettings
could be kept in memory like the artist qTips are instead of being built each time the settings menu gets called, but I'll leave that to a separate PR/commit. You can do it if you want, or I can do it if you want me to.