A major bottleneck of the code seems to be in the rendering of proofs. This is for two reasons:
The algorithm itself takes a while
Since the old DOM elements are removed and replaced by the new, a GC occurs which is sometimes very large and very slow.
Ideas on how to fix this:
Use vanilla JS rather than jQuery to speed up algorithm
Instead of replacing the DOM elements of the proof, walk the element tree and only make the changes that need to be made. PF can still be retained. Do as follows: (1) generate the new DOM tree representing the new tree and (2) walk the old DOM tree, making required changes.
Perhaps there's already a jQuery plugin or something that implements this?
A major bottleneck of the code seems to be in the rendering of proofs. This is for two reasons:
Ideas on how to fix this:
Perhaps there's already a jQuery plugin or something that implements this?