Description
Currently there are a few operations that take a performance hit that is noticeable due to brief UI lockups, these mostly occur when the comment section is loading, which can contain a significant amount of data, and deep hierarchy.
In multiple sections of the extension the root path is being passed arbitrarily, meaning the recursive function has to traverse the entire json tree even when it might not be of interest for the function using it.
Ideally this should be substituted by a specific prior root path check to ensure the data is of interest of the function, for example:
Iridium/src/firefox/js/background-inject.js
Lines 254 to 259 in a5b58a3
Problem is this might introduce bugs because there might be multiple paths for the same root and all must be covered, for example a multi-path deep node:
Iridium/src/firefox/js/background-inject.js
Lines 2707 to 2708 in a5b58a3
However, the performance impact is noticeable so this must be improved in one way or another.