AccessKit / accesskit

UI accessibility infrastructure across platforms and programming languages
BSD 3-Clause "New" or "Revised" License
991 stars 48 forks source link

fix: Go back to detecting unchanged nodes when processing tree updates #415

Closed mwcampbell closed 1 month ago

mwcampbell commented 1 month ago

This basically reverts #138. Comparing nodes is cheaper now than it was when we had a big struct with all possible properties. And I didn't end up moving to a node trait. On balance, it's now probably cheaper to compare nodes while processing the tree update than to do some kinds of comparisons in the platform adapter. But I kept the documentation change that I made in that PR, since what it says is still true; it's most efficient for tree updates to not include unchanged nodes.

Also, we no longer do a preliminary pass to collect updated nodes. This was necessary when we had to create detached nodes with some of the old state, but we're not doing that anymore.