-
Notifications
You must be signed in to change notification settings - Fork 21
Alternative solutions #12
Copy link
Copy link
Open
Labels
PerformancePerformance implicationsPerformance implicationsdiscussionSeeking wider community inputSeeking wider community input
Description
Right now, RxDogTag is implemented via throwing an exception and capturing the stack frame at that point. While we haven't seen any measurable performance impact at a macro level, it's certainly not free either. This issue exists to capture possible alternative implementation ideas.
Bytecode transformer
Recognizes certain subscribe() signatures and re-weaves them to have the hardcoded subscribe tag present with a custom tagging observer. Cost is just a string then.
- Pros:
- Effectively zero runtime overhead
- Cons:
- Invasive
- Potentially mangles stacktraces
- Could impact build times
- Unclear what API could/would be used, or if line/method/class information is available.
Compiler plugin
Recognizes certain subscribe() signatures and re-weaves them to have the hardcoded subscribe tag present with a custom tagging observer. Cost is just a string then.
- Pros:
- Effectively zero runtime overhead
- Should be low-to-no overhead with build times. Cacheable as part of compilation
- Cons:
- Invasive
- Potentially mangles stacktraces
- Language-dependent
- No formally public APIs for Java or Kotlin, just non-public ones
- Unclear what API could/would be used, or if line/method/class
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PerformancePerformance implicationsPerformance implicationsdiscussionSeeking wider community inputSeeking wider community input