oxalorg / 4ever-clojure

Pure cljs version of 4clojure, meant to run forever!
https://4clojure.oxal.org
231 stars 28 forks source link

Lazy load view solutions page #34

Open pradeepbishnoi opened 3 years ago

pradeepbishnoi commented 3 years ago

Currently if you open the 'view solutions' of problem 1 - it goes into a frozen state and then after a minute or so it shows up all solutions. Will be good user experience to load first 5-10 solutions and then on scroll down bring the next 10 etc.

https://4clojure.oxal.org/#/problem/1/solutions

Also, can think for creating a Set and remove duplicate solutions. Look at the screenshot with duplicate solution for problem 1 (it might be the case for other as well). Better will be to clean the solutions data one time (remove duplicate) and store it.

image
borkdude commented 3 years ago

Yes. It might not be so much the amount of data, but the amount of rendering might take the most of the time. React is known to not work well with large lists. So maybe it's good to first find out if that's the bottleneck or not. React Virtualized offers a solution for rendering larger lists well, perhaps there are also other solutions. @oxalorg