Commit Graph

13 Commits

Author SHA1 Message Date
Glint Dev
938f05f59d Phase 10: Monitoring and automated benchmarks
10.1: Add Criterion dev-dependency and benchmarks for:
  - matching_rules (100 rules)
  - ComputedStyle::compute (empty, 5 props)
  - resolve_string (no vars, 1 var, 3 vars)

10.3: Add --perf CLI flag and src/perf.rs module:
  - PerfScope drop-guard timed scopes (vdom, style, render)
  - Instrumented: VDOM eval (app.rs update), render (app.rs view),
    style matching (style.rs compute_cached)
  - Per-frame report printed to stderr at end of view()

10.2+10.4: Threshold check in perf report:
  - Prints warning if total > 16ms (60 FPS frame budget)

Refactor: Move Message enum to lib.rs so benchmarks can import
the public API. Added lib.rs as library root.
2026-07-24 19:58:58 +03:00
Glint Dev
28bd450787 Phase 8: StyleCache memoization
Add StyleCache struct with hash-keyed LRU-eviction strategy and
integrate into StyleSheet via Mutex<StyleCache> so no signature
changes are needed on evaluate_vdom_incr.

- StyleCache::get_or_compute hashes (type_name, props, epoch) -> ComputedStyle
- LRU: full clear on overflow (max 1024)
- RefCell avoided in favor of Mutex so StyleSheet remains Sync
  for parallel matching_rules_batch
- Manual Clone impl skips cache (fresh cache on clone)
- Call sites in evaluate_vdom_incr switched from ComputedStyle::compute
  to stylesheet.compute_cached
- Cache cleared in build_index after epoch increment (stale entries)
2026-07-24 18:47:41 +03:00
Glint Dev
1ede7d0f7f phase 7.2/7.4: add compute_batch and matching_rules_batch for parallel style processing 2026-07-24 16:46:31 +03:00
Glint Dev
32beb81ac4 demo: layout fixes, sticky removal, style overrides, css-like rendering improvements 2026-07-24 16:46:00 +03:00
Glint Dev
fd2863678b Phase 4.5: Add tests for StyleIndex 2026-07-22 13:10:09 +03:00
Glint Dev
43c4291ac8 Phase 4.3: Use index in matching_pseudo_rules() 2026-07-22 13:07:02 +03:00
Glint Dev
cd2cf64e80 Phase 4.2: Add query_index() and use it in matching_rules() 2026-07-22 13:06:43 +03:00
Glint Dev
24fbd17f3e Phase 4.1: Add StyleIndex struct and build_index() to StyleSheet 2026-07-22 13:06:01 +03:00
Glint Dev
26ed1f900e Revert "Phase 4.1-4.2: StyleIndex with by_tag/by_class/by_id indexes, replace matching_rules with query_index, build_index after parsing"
This reverts commit 87feba394d.
2026-07-22 13:01:33 +03:00
Glint Dev
bc45e85adf Phase 4.3-4.4: Style match cache with epoch invalidation (RefCell), remove redundant re-sort in query(), merge-scan complex rules in order 2026-07-22 12:59:40 +03:00
Glint Dev
87feba394d Phase 4.1-4.2: StyleIndex with by_tag/by_class/by_id indexes, replace matching_rules with query_index, build_index after parsing 2026-07-22 12:56:36 +03:00
faynot
75af23930f feat: new styles 2026-07-08 23:45:37 +03:00
Faynot
f956b750e3 feat: reactivityl; vdom; rhei; styles; fs; image element 2026-06-02 12:12:20 +03:00