Replies: 2 comments
-
There are multiple factors affecting this. Majorly #5270 / #6295 will be first step to make output more closer to native ecma support, but it won't be complete in single major release.
This is separate, so far I do not think we'll going to pursue in a short time period of release at least. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Moved to discussions as issue is being used for core team's backlog. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all congratulations on the 7.0.0 release! I’m writing a data fetching library and was looking into RxJS now that the bundle size has been reduced significantly.
The bundle size without any operators is around 3.22 KB minzipped. This is still quite a bit when trying to write a small library but in my opinion acceptable. However, when importing
mergeMap
the bundle size increased with 55% to 5 KB.This was a bit surprising as the operator itself should be pretty small. I tracked it down to the usage of the
from
operator withinmergeMap
. The usage of this operator adds 1.57 KB to the bundle.The main reason is the usage of async generators within
fromAsyncIterable
andreadableStreamLikeToAsyncGenerator
as TypeScript will import helpers to polyfill this syntax. Maybe this can be written in an alternative way?Also, would it be an idea to remove these implicit conversions in a next version?
This would allow users to opt-in to specific conversions like:
mergeMap(url => fromPromise(fetch(url)))
Making it more explicit reduces the bundle size, increases runtime performance and also matches with the standard library as JS provides
Array.from
to convert array-like objects, but it does not embed this functionality in other parts (that I know of).Beta Was this translation helpful? Give feedback.
All reactions