Skip to content

#23 Lazy-Load States for Memory Conservation#29

Merged
DamianSuess merged 4 commits intomasterfrom
feature/23-LazyLoadStates
Dec 18, 2025
Merged

#23 Lazy-Load States for Memory Conservation#29
DamianSuess merged 4 commits intomasterfrom
feature/23-LazyLoadStates

Conversation

@DamianSuess
Copy link
Contributor

@DamianSuess DamianSuess commented Dec 18, 2025

  • [v1.0-beta] Lazy Load States #23
  • Register state factories (Func<IState<TState>>) keyed by enum IDs.
  • Instantiate a state on first entry (lazy).
  • Optionally evict instances after OnExit via a toggle EvictStateInstancesOnExit (default: false).
  • Preserve composite behavior by wiring submachines only when the composite state is first created.
  • Keep command state semantics (event subscription + timeout).
  • Continue supporting DOT/Graphviz export via ExportUml()—including the legend subgraph you requested. During export, it builds ephemeral instances to read transitions without keeping them alive.

…tion factory class. ExportUml() includes a symbols "Legend". This does not include the updated unit tests.
… lazy-loading methodology. RegisterComposite() now overloads, RegisterState(..)
@DamianSuess DamianSuess added this to the v1.0-Beta milestone Dec 18, 2025
@DamianSuess DamianSuess self-assigned this Dec 18, 2025
@DamianSuess DamianSuess added the enhancement New feature or request label Dec 18, 2025
@DamianSuess DamianSuess merged commit db91d30 into master Dec 18, 2025
@DamianSuess DamianSuess linked an issue Dec 18, 2025 that may be closed by this pull request
@DamianSuess DamianSuess deleted the feature/23-LazyLoadStates branch December 18, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v1.0-beta] Lazy Load States

1 participant