Skip to content

Cache user singleton pointers - #1644

Merged
Bromeon merged 1 commit into
masterfrom
feature/cache-user-singletons
Jun 27, 2026
Merged

Cache user singleton pointers#1644
Bromeon merged 1 commit into
masterfrom
feature/cache-user-singletons

Conversation

@Bromeon

@Bromeon Bromeon commented Jun 23, 2026

Copy link
Copy Markdown
Member

Extend per-type singleton cache (#1636) to #[class(singleton)], which have a stable pointer for their init level's lifetime, just like engine singletons.

Small test reorganization:

  • Move singleton_caching_stable_instance -> engine_singleton_caching (singleton_test.rs)
  • Add user_singleton_caching
  • Remove redundant singleton_is_unique

@Bromeon Bromeon added c: register Register classes, functions and other symbols to GDScript performance Performance problems and optimizations labels Jun 23, 2026
@GodotRust

Copy link
Copy Markdown

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1644

Extend per-type singleton cache to `#[class(singleton)]`, which have a stable
pointer for their init level's lifetime, just like engine singletons.
@Bromeon
Bromeon force-pushed the feature/cache-user-singletons branch from 39c8a89 to 97f8d0d Compare June 27, 2026 11:21
@Bromeon
Bromeon enabled auto-merge June 27, 2026 11:22
@Bromeon
Bromeon added this pull request to the merge queue Jun 27, 2026
Merged via the queue into master with commit 46ffa5e Jun 27, 2026
17 checks passed
@Bromeon
Bromeon deleted the feature/cache-user-singletons branch June 27, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: register Register classes, functions and other symbols to GDScript performance Performance problems and optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants