Commit Graph

18 Commits

Author SHA1 Message Date
Glint Dev
b6fa841d11 Phase 9: Keyed widgets (9.1 + 9.2)
9.1: Add content_hash field to Element, computed during VDOM evaluation
  from type_name + properties + children content_hashes via DefaultHasher.

9.2: Assign stable iced::widget::Id to text_input and scrollable widgets
  so Iced preserves widget state (cursor position, scroll offset) across
  frames. Ids are cached in a thread_local HashMap to avoid leaks.

9.3 skipped: iced::Element is not Clone and contains Box<dyn Widget>,
  making element-level caching impractical without unsafe lifetime hacks.
2026-07-24 19:53:02 +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
144ac12107 phase 7: fix @each to stay sequential (RheiContext not Sync); keep compute_batch/matching_rules_batch in style.rs 2026-07-24 16:55:52 +03:00
Glint Dev
469e87eaf3 phase 7.3: parallel @each using rayon (feature gate, threshold >= 10 items) 2026-07-24 16:47:02 +03:00
Glint Dev
4eec003939 feat: add FlatVDom types and evaluate_vdom_flat helper 2026-07-22 13:40:04 +03:00
Glint Dev
a798e966f3 feat: add FlatVDom round-trip conversion tests 2026-07-22 13:38:03 +03:00
Glint Dev
be6d5c36fc fix: eliminate deep Element cloning in @if by using &[&Element] references 2026-07-22 13:35:12 +03:00
Glint Dev
06aa67b23f Phase 4.4: Build index at Document load time in interpeter::run() 2026-07-22 13:07:30 +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
Glint Dev
4a6dea6dd8 Phase 3.4-3.7: evaluate_vdom_incr with dirty_set propagation, tests for ReactiveTracker 2026-07-21 20:40:23 +03:00
Glint Dev
d8d3f57a21 Phase 3.1-3.3: ReactiveTracker with ElementId assignment during parsing, dependency scanning, variable change notification in app.rs 2026-07-21 20:38:41 +03:00
Glint Dev
a46c9bc9e7 Phase 2: InternedStr and Interner types (infrastructure) 2026-07-21 20:35:56 +03:00
Glint Dev
f3ea96258c Phase 1: cleanup unused imports and static 2026-07-21 20:33:08 +03:00
Glint Dev
30cf2e5e26 Phase 1.2-1.6: replace variables HashMap<String,String> with HashMap<String,Value>, rewrite str_to_dyn/dyn_to_str -> value_to_dynamic/dynamic_to_value, update resolve_string/evaluate_condition/is_truthy for Value 2026-07-21 20:32:29 +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