Skip to content

Conversation

@deanlee
Copy link
Contributor

@deanlee deanlee commented Dec 4, 2025

OnboardingWindow is now created only when onboarding is required and destroyed after use, improving startup time, reducing resource usage, and preventing callbacks registered by OnboardingWindow from being triggered unnecessarily during the UI’s lifetime, which could cause unintended side effects.

@github-actions github-actions bot added the ui label Dec 4, 2025
@deanlee deanlee force-pushed the ui-instantiate-onboarding-when-needed branch from 2ccc0d5 to 027c52e Compare December 4, 2025 15:55
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

raylib UI Preview

All Screenshots

@adeebshihadeh
Copy link
Contributor

Nothing in particular about it should be slow, so I don't think this is the right move to improve startup time. We just need to make font, picture, etc loading way faster.

@sshane
Copy link
Contributor

sshane commented Dec 5, 2025

I agree

@deanlee
Copy link
Contributor Author

deanlee commented Dec 5, 2025

The main reason for lazily creating and destroying OnboardingWindow isn’t startup performance in general — it’s correctness and resource safety.

OnboardingWindow was previously instantiated on every boot. That means:

  • A DM CameraView was being created unconditionally, it's not cheap
  • Interactive timeout callbacks were registered
  • Params like IsDriverViewEnabled could be touched prematurely

These side effects should only run when onboarding is actually needed. Font/texture loading is the real startup bottleneck, but this change fixes incorrect and risky behavior — it’s the right design regardless of performance.

@adeebshihadeh
Copy link
Contributor

  • A DM CameraView was being created unconditionally, it's not cheap

Let's make it cheap! What's slow here?

  • Interactive timeout callbacks were registered

So?

  • Params like IsDriverViewEnabled could be touched prematurely

Why? If this is the case, it sounds like a bug anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants