functionalDependencyCalculator icon indicating copy to clipboard operation
functionalDependencyCalculator copied to clipboard

Performance Issue

Open thtTNT opened this issue 2 years ago • 1 comments

Hi, the project is very useful for me. While it has a performance issue when input goes complex, for example, {A} -> {E,I}, {B,C} -> {D,E,G}, {C,E,H} -> {G,J}, {D} -> {C,J}, {D,H,J} -> {A,B}.

I have done some tests on the application, here are two main reasons for the performance issue:

  1. Latex compiling cost time: Converting latex to HTML is quite slow.
  2. The HTML code generated by latex is quite complex, as the data grows, it consumes lots of memory.

Here are two ways I think which will solve the problem,

  1. Don't use latex, write a small compiler to convert FD to HTML code.
  2. Use a virtual list or pagination, only render limited items on the screen. While, for this method, I can introduce some frameworks like Vue, or only use pure Javascript but more complex.

Which method do you think is better? After your reply, I can work on it and create a PR soon.

@arjo129

thtTNT avatar Nov 23 '23 13:11 thtTNT

Hi @thtTNT , thanks for wanting to work on this. Approach 1 seems a lot more sensible. Theres also the question of if its actually render time, or something in the code. A lot of the code has an exponential run time. I kind of wrote this as a hack so :shrug: .

arjo129 avatar Nov 23 '23 23:11 arjo129