Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA] Load lazy fields on init in the background #3803

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented Oct 17, 2024

📜 Description

Lazy fields in SentryOptions are now loaded on init in the background

💡 Motivation and Context

Instead of loading the options fields backed by LazyEvaluator when needed, we do it in the background as soon as we can. When the SDK will need these fields, they will be already cached and ready to use

This improved init() by ~5-15ms in profileable builds

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@stefanosiano stefanosiano marked this pull request as ready for review October 17, 2024 15:22
@stefanosiano stefanosiano changed the title Loaf lazy fields on init in the background [QA] Load lazy fields on init in the background Oct 17, 2024
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 421.84 ms 463.94 ms 42.10 ms
Size 1.70 MiB 2.35 MiB 667.95 KiB

@stefanosiano stefanosiano merged commit 0cc9262 into main Oct 18, 2024
32 checks passed
@stefanosiano stefanosiano deleted the fix/load-lazy-background branch October 18, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants