Skip to content

Bump version to 1.0.0 - #197

Merged
berendkleinhaneveld merged 1 commit into
masterfrom
bump-version
Jul 10, 2026
Merged

Bump version to 1.0.0#197
berendkleinhaneveld merged 1 commit into
masterfrom
bump-version

Conversation

@berendkleinhaneveld

@berendkleinhaneveld berendkleinhaneveld commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Bumps the version to 1.0.0 — observ's first stable release.

What's in it since v0.19.0

New features

Correctness

Docs & tooling

Performance

The headline of this release. A cluster of changes to the traversal, trap, and proxy-creation hot paths adds up to large wins across the board — deep-watch traversal in particular is up to ~85% faster.

Numbers below are median times from pytest-benchmark, each version run twice and averaged, on an Apple M1 (CPython 3.14). Lower is better; negative change = faster.

Deep-watch traversal (the biggest wins)

Filtering plain leaf values out of the traverse stack at push time and traversing raw targets directly (#190), on top of earlier traverse work.

benchmark v0.19.0 (µs) v1.0.0 (µs) change
test_traverse_large_flat_list 102.52 15.98 -84%
test_traverse_stress_large_shallow 105.71 18.50 -82%
test_traverse_matrix 270.56 56.19 -79%
test_traverse_shallow 11.04 2.42 -78%
test_traverse_stress_large_mixed 102.65 43.17 -58%
test_traverse_mixed 27.19 12.44 -54%
test_traverse_list 108.50 78.08 -28%
test_traverse_deep 45.06 38.10 -15%
test_traverse_wide 488.46 417.15 -15%
Overall -55%

Reactive writes

Lower per-operation trap overhead (#192).

benchmark v0.19.0 (µs) v1.0.0 (µs) change
test_write_dict_new_key[1k] 0.77 0.44 -43%
test_write_list_append[1k] 0.59 0.34 -43%
test_write_dict_setitem[1k] 0.88 0.57 -36%
test_write_list_setitem[1k] 0.54 0.35 -36%
test_write_set_add[1k] 0.62 0.40 -35%
test_write_dict_update[1k] 1.22 0.93 -24%
Overall -31%

Proxy creation

Proxies constructed with positional flags instead of keyword lookups (#193).

benchmark v0.19.0 (µs) v1.0.0 (µs) change
test_proxy_creation_dict[10] 9.91 4.80 -52%
test_proxy_creation_dict[100k] 16.97 8.29 -51%
test_proxy_creation_dict[1k] 9.68 5.07 -48%
Overall -50%

Reactive reads

benchmark v0.19.0 (µs) v1.0.0 (µs) change
test_read_dict_getitem_tracked 49.27 37.83 -23%
test_read_dict_getitem[reactive] 24.04 18.87 -21%
test_read_list_getitem[reactive] 22.38 19.69 -12%
Overall -19%

End-to-end (build + watch + mutate)

Whole-workflow benchmarks, so they fold the wins above together.

benchmark v0.19.0 (µs) v1.0.0 (µs) change
test_dict_plain_vs_reactive[reactive] 51,777.29 27,448.65 -47%
test_list_plain_vs_reactive[reactive] 38,708.31 21,608.22 -44%
test_deep_watch_mutate_leaf[1k] 4,571.75 2,609.08 -43%
test_set_plain_vs_reactive[reactive] 39,850.35 24,171.75 -39%
test_notify_watchers[1k] 1,982.15 1,839.74 -7%
Overall -37%

Plain (non-reactive) baselines are unchanged, as expected (all within ±2% noise).

One regression, called out honestly

test_watcher_creation went from ~2.6 µs to ~3.4 µs (+30%), consistent across both runs. This is a one-time cost paid when a Watcher is constructed, traded for the much cheaper notification and traversal that every watcher pays repeatedly afterwards. Net effect on any realistic workload is strongly positive — see the end-to-end numbers above.

First stable release. Since v0.19.0, observ has had a broad performance
overhaul, gained full type-hint coverage and a new trigger_ref API, and
picked up a documentation site.

New features
- trigger_ref(): force-notify the watchers of a proxy, mirroring Vue's
  triggerRef (#188, closes #123).
- Fully typed: modern type hints throughout, a py.typed marker, and ty
  type-checking enforced in CI (#185, #184, closes #114).

Performance
- Reworked deep-watch traversal: plain leaf values are filtered out of the
  traverse stack at push time and raw targets are traversed directly.
  Traversing large flat/shallow structures is up to ~85% faster (#190).
- Lower per-operation trap overhead and proxies constructed with positional
  flags: reactive reads/writes and proxy creation are ~35-50% faster
  (#192, #193).
- proxy_db lifetimes are managed by reference counting instead of a gc hook,
  eliminating reference cycles and making cleanup deterministic (#177).
- Scheduler and dependency-bookkeeping micro-optimizations: in-place bisect
  insertion (#191), single-read/write flush counting (#196), a set
  difference in cleanup_deps (#194), and reading the arg count off the code
  object in weak() (#195).

Correctness
- Guarantees, with tests, that observ creates no reference cycles (#189).

Documentation
- New MkDocs site published to GitHub Pages (#176), with an Internals
  section (#179) and a rewritten README (#180).

Tooling
- Modernized CI workflows (#182) and a more robust benchmark guard
  (#181, #187).
@berendkleinhaneveld
berendkleinhaneveld merged commit c2954e9 into master Jul 10, 2026
11 checks passed
@berendkleinhaneveld
berendkleinhaneveld deleted the bump-version branch July 10, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trigger_ref Type hinting improvements

2 participants