RxJava in not nice when it comes to stacktraces.
The worst thing is observeOn that schedules execution on different threads. Every time we use observeOn we get our stacktrace from the process root, all the call history gets erased.
The idea is to make schedulers save the caller's stack, wrap action calls and attach the stacktrace to each exception that has been thrown by scheduled actions.
Pros:
traceable exceptions
Cons:
Performance cost
Leaks because of recursion
I think that we can have Schedulers.io(boolean trace) alternative that will save the stacktrace, so we could call it Schedules.io(DEBUG) to turn stacktracing off on production for performance critical parts.
How do you guys find this idea?
RxJava in not nice when it comes to stacktraces.
The worst thing is
observeOnthat schedules execution on different threads. Every time we useobserveOnwe get our stacktrace from the process root, all the call history gets erased.The idea is to make schedulers save the caller's stack, wrap action calls and attach the stacktrace to each exception that has been thrown by scheduled actions.
Pros:
traceable exceptions
Cons:
Performance cost
Leaks because of recursion
I think that we can have
Schedulers.io(boolean trace)alternative that will save the stacktrace, so we could call itSchedules.io(DEBUG)to turn stacktracing off on production for performance critical parts.How do you guys find this idea?