Improve Diffs Tree View generation
!103684 (merged) fixes a bug with the way the tree view is generated by adding some guard code before assuming values are available.
However, the way the current tree worker code generates the MR tree has potential to be improved.
- Refactor how the file tree is computed to avoid multiple loops
- Do we only use the flattened tree output and - if so - can we avoid recursion entirely?
- Guarantee that filename/path parts cannot accidentally select native JS properties
- We can use a Set to avoid accidentally selecting from the
prototype
- We can use a Set to avoid accidentally selecting from the
- Fix this browser warning that doesn't seem possible:
- Consider moving the tree worker out of the worker entirely if we don't need multiple passes or deep recursion
- If we're only generating a single, flat Set, the multi-threaded worker may be unnecessary complexity.
Edited by Thomas Randolph