On Wednesday, 2 June 2021 at 09:37:10 UTC, drug wrote:
02.06.2021 00:47, Ola Fosheim Grøstad пишет:
I tried retained and immediate GUI, both fail (imho) for my use
case - large data set of 1M+ heterogeneous items.
Depends on the data, I guess, if they are all visible at once
then you basically have to very carefully write your own GPU
render stage for that view and carefully cache things that does
not move by rendering them to buffers (in GPU memory).
I was forced to invent my own wheel some where in-between
retained and immediate GUI. Later I got know that it worked
like browsers did (of course in general). I think that
browser-like GUI is the future. Just current browsers are very
over-engineered.
They have some inefficiencies in how the DOM is being manipulated
(like setting numeric styles as strings, but there is a fix
coming for this, maybe it is available already?)
But if you deal with large number of items you basically can
write your own view and dynamically create elements as the user
scrolls. You do need to estimate the height though.
You can have a web-worker handling the dataset and basically
stream it to the main thread that does the GUI. There is a delay
though, so it takes some tweaking.