3 ms·
I also did sort-of Pokedex a long time ago [0], but haven't seen any performance issues. No virtualization whatsoever. Code [1] is rather simple. [0]: https://
by mlajtos 5y ago
I also did sort-of Pokedex a long time ago [0], but haven't seen any performance issues. No virtualization whatsoever. Code [1] is rather simple.
[0]: https://mlajtos.github.io/lb-pokedex/build/ https://mlajtos.github.io/lb-pokedex/build/
[1]: https://github.com/mlajtos/lb-pokedex https://github.com/mlajtos/lb-pokedex
- Kuinox 5y agoI ran a profiling tool. I searched "zz" then deleted these. Deleting it caused a 120ms UI freeze (and I notice it :p): Profiling report: https://share.firefox.dev/3C3OhIq https://share.firefox.dev/3C3OhIq Given I had slightly more entries (a hundred more) and that I had way more node per entry, it led me with way worse performance. Instead of a plain list I have a little summary card per pokemon (which is why I have more node per entry). The naive implementation in Vue run flawlessly(sadly no preview): https://github.com/Kuinox/kuinox_pokedex/ https://github.com/Kuinox/kuinox_pokedex/ Note that the react implementation do weird thing because I tried to get around the issue without success.
- mlajtos 5y agoYou can also preserve DOM and just hide non-matching elements, like here: https://codesandbox.io/s/hidden-dawn-odm1m1?file=/src/App.tsx https://codesandbox.io/s/hidden-dawn-odm1m1?file=/src/App.ts...