-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Only perform thread checking in debug builds #14293
Conversation
Another alternative would be generating the |
I'm not sure that would work as our users library are always consuming the release binary. For them thread checking will always be disabled. What is proposed in this PR is to check against the debug/release state of the consuming app. |
True, unless we ship a processor in a separate artifact that replaces the default (slow) implementation, and possibly unlocks other code generation features. Interested users could include that artifact in their build scripts. Or does that sound like overkill? |
We will be looking into #14293 (comment) as alternative approach to fixing this issue. Closing this PR for now. |
Hi @tobrun, Any idea of ETA for the alternative solution ? Alex |
No concrete ETA but we are trying to pick this up for upcoming release aimed at end of the month. If we don't hit that, it will be included in the release of next month. |
I've done my due research on the topic:
Both of the above sound like a hell to maintain. The only realistic way of doing a completely clean build-type optimization, without any additional checks, would be not including I don't think that offered features would benefit users enough to force that dependency now, but it's something we can revisit in the future. In the meantime, I'm reopening this PR as a way to tackle the original issue. |
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.
🚢
e115b08
to
b5b58a5
Compare
…rating app. Use constants for source when thread checking
b5b58a5
to
b80e034
Compare
Closes #14287, possible solution alternatively the static lazy initialization can be replaced if we can ask users to provide their BuildConfig.DEBUG value through Mapbox.getInstance.