Commit Graph

10 Commits

Author SHA1 Message Date
Bruce Mitchener f72f556e9e
docs: Missing backticks (#900) 2025-03-19 18:34:29 +00:00
Daniel McNab 3fe3ef6150
Migrate to v5 of the Linebender lint set (#867)
See linebender/linebender.github.io#88 (and some other earlier PRs)

A follow up like https://github.com/linebender/vello/pull/806 will also
be needed, but that can come later.
2025-02-17 09:54:29 +00:00
Olivier FAURE 8276e757bb
Refactor TreeArena (#827)
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.
2025-01-21 13:33:04 +00:00
Olivier FAURE 066d4319e8
Use nightly rustfmt to format imports (#838) 2025-01-20 13:19:26 +00:00
Bruce Mitchener 326cb2bdbe
ci: Update stable Rust and typos (#793) 2024-12-18 23:37:11 +00:00
Kaur Kuut 65ecc25907
Replace CI `RUST_MIN_VER_PKGS` with `--workspace --ignore-private`. (#782)
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.
2024-12-11 11:15:29 +00:00
Philipp Mildenberger 8e05367dd0
tree_arena: Use `hashbrown::HashMap` as drop-in replacement to optimize tree-access (#774)
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).
2024-12-09 13:40:15 +00:00
Olivier FAURE 60acee2f89
Use Hashmap to track TreeArena node's children (#772)
This should improve performance in cases with where a widget has a very
large number of direct children.
2024-12-06 15:48:45 +00:00
Kirpal Grewal 3aebc985de
use cargo rdme for tree arena (#769)
Use `cargo rdme` for crate readme and check in CI as mentioned in
https://github.com/linebender/xilem/pull/752#discussion_r1867737085
2024-12-05 13:39:28 +00:00
Kirpal Grewal a1d47a06bb
Tree arena (#752)
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)
2024-12-05 10:18:52 +00:00