-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Split creation functions from creation functions with Schedulers #3264
Comments
Do we have guesstimate of user numbers uses scheduler when create? I do obviously, and all of my test cases are. I'm feeling it might be confusing number of api surface even if separated out as own export 🤔 |
@kwonoj I can do a search of google projects to get a pretty good ballpark number. |
Plus if fns are separated, what's recommended pattern to inject testscheduler for observables? |
That wouldn't change... The change proposed above would obviously not include things like |
Is the proposal for a public Otherwise, sounds good to me. |
@cartant you're right, we can probably keep them all in the same spot. 🤷♂️ (I changed the OP to reflect this) |
Done. |
Currently we have creation functions like so:
from(obj)
andfrom(obj, scheduler)
range(a, b)
andrange(a, b, scheduler)
Problem
Schedulers and scheduling adds a LOT of bloat to bundles and we can't currently avoid it.
If you look at the implementations of these you'll see an obvious pattern, especially in the ones I more recently created as "just functions":
Proposal
from
andfromScheduled
,defer
anddeferScheduled
,range
andrangeScheduled
etc.If we do this, then the majority of RxJS usage (which doesn't involve schedulers) can avoid pulling in scheduler-related classes and scheduling-related logic.
That would make the above into:
95% use case
and else where
5% use case
Risks
It will be a breaking change for people using schedulers today. Easy to fix, but annoying.
The text was updated successfully, but these errors were encountered: