3 ms·
I 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.firefo
by Kuinox 5y ago
I 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...