Make tests more spread out and more readable.
Add comments detailing the state of the arena being tested.
Fix a lifetime error in unsafe API.
Rename Arena[Ref/Mut]Children to Arena[Ref/Mut]List
Rename a lot of methods.
Rework documentation.
Unify safe and unsafe APIs.
The CI `RUST_MIN_VER_PKGS` configuration variable was meant to track
packages that are intended for publishing in order to limit MSRV checks
to only those packages. This same goal can be achieved universally
without the need for a configuration variable via the `--ignore-private`
`cargo-hack` option.
The immediate effect on this repo is that `xilem_core` is no longer part
of the MSRV check because it has `publish = false`. That is fine,
because the MSRV check will run just before publishing, triggered by the
PR that will remove `publish = false`, ensuring that the MSRV is
accurate before publishing.
As noted in
https://github.com/linebender/xilem/pull/772#pullrequestreview-2485087588,
this seems to be a really cheap but quite effective optimization, as we
have `hashbrown` already in our dependency tree.
I've noticed speedups of the rewrite passes of up to >100%.
On average about 20-50% and is also definitely noticeable (smoother and
less latency).
Another quite interesting observation with my (admittedly not really
reproducible) performance tests,
is that the safe tree arena is actually faster than the unsafe version
(roughly 10-30%), and tells yet another time that benches are really
important while optimizing...
Rough overview of my performance tests/benches:
I've mostly hovered over 10000 buttons in the mason example while
testing, but every second or so a new button is spawned and also this is
quite a bit faster.
I did a quick'n dirty `Instant::elapsed` in the event loop (so rendering
is not included, but I think there's also a speedup as we're iterating
the tree).
I've had a try at implementing the unsafe `tree_arena` in a separate lib
(but in the same workspace for now) - haven't thought of a good way to
make non root access not O(depth), without slowing down insertion or
using more memory, though have improved accessing nodes from the root to
O(1) from O(depth) and accessing direct children to O(1) from
O(children)