-
-
Notifications
You must be signed in to change notification settings - Fork 435
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] Cache parsed Dsn #3796
[QA] Cache parsed Dsn #3796
Conversation
Performance metrics 🚀
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I left a few comments - please have a look!
@SuppressWarnings("unused") | ||
final Dsn parsedDsn = new Dsn(dsn); | ||
// This creates the DSN object and performs some checks | ||
options.getParsedDsn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind-of brittle, as whoever calls getParsedDsn()
first, may receives an exception. On the other hand it was like this before, so all good for now 😃
added test for LazyEvaluator.resetValue setting a new dsn resets the cached parsed dsn
📜 Description
We parse the dsn multiple times in the app lifecycle, and most of the times on the main thread. We can parse it once and cache its result
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps