|
|
|
|
|
by amelius
1957 days ago
|
|
Perhaps I should give a different example: a listbox filled with 1 million items, with a scrollbar. If the public API requires you to give a new paint command on every frame (everytime the scrollbar is dragged), then regardless of whether the underlying rendering engine performs each of these paint commands, you still have to run through every item of the list (and so does the diff'ing code), making this a O(N) operation on every frame. |
|
But I guess different UI frameworks have different solution for this. Creating and updating a 1 million item list wouldn't be a cheap operation in a traditional UI system either.