Quelklef / fitch

Interactive proof assistant for Fitch-style natural deduction
https://maynards.site/fitch
3 stars 0 forks source link

Make program less slow #6

Closed Quelklef closed 3 years ago

Quelklef commented 5 years ago

A major bottleneck of the code seems to be in the rendering of proofs. This is for two reasons:

  1. The algorithm itself takes a while
  2. 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:

  1. Use vanilla JS rather than jQuery to speed up algorithm
  2. 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?

Quelklef commented 3 years ago

Irrelevant due to the Elm-rewrite