-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Monitor if we can remove some unnecessary code from the js bundle #49299
Comments
Current assignee @mountiny is eligible for the AutoAssignerNewDotQuality assigner, not assigning anyone new. |
Triggered auto assignment to @puneetlath ( |
No need for bug zero person now |
Hey, I'm from Callstack, I can take a look at it |
not overdue |
Monthly |
There is an increase in size of 0.6 MB, from 19.18 to 19.78 MB, and it seems to be caused by different modules. I think the next time we monitor this, if there is another big increase we should try to dig into this to find how to improve it. @mountiny |
sounds good, keeping this monthly |
@gedu how is this looking now? |
A month has passed already? wow, I will check |
This time the increase was 0,34MB, from 19,78MB to 20,12MB. Not sure if we want to set a max value so we try to be below it. @mountiny |
Is there anything you could find that could be removed? |
I can take a deeper look and see if I can find something |
@mountiny First thing I saw it is this If we don't need the legacy one we can save ±2MB If you have more information around it would be awesome, and if needed I can check with one of our devs to take a deeper look |
@mountiny I was investigating a bit further and probably would be good to create an issue around this because now, for example the
Given that importing a worker is the recommended way, maybe we can be smarter on which build to load (thanks to @rezkiy37 to point this) |
@gedu yeah this sounds good to me Would you mind posting the details of the problem/ solution here for the issue and I can create it |
Propose to update I found this issue reported: Expensify/react-native-qrcode-svg#199 Chatting internally, we think we can add a conditional code to would work as expected. if someone is using 0.75 with TextDecoder & TextEncoder supported natively then fine we don’t require |
Sounds good, feel free to make a proposal! |
Background
ProblemWhen using SolutionUpdate react-fast-pdf so the PDFThumbnail component (and any other relevant parts of React-PDF) to dynamically load the appropriate pdf.worker.js build based on the environment.
|
Background
Reference the relevant issue and commit: ProblemThe react-native-qrcode-svg library always includes the text-encoding library, adding approximately 600KB to the app bundle size. This is unnecessary for React Native 0.75+ environments, where TextDecoder and TextEncoder are natively supported, leading to inefficiencies in modern applications. Proposed SolutionUpdate react-native-qrcode-svg to conditionally include the text-encoding library based on the React Native version or the availability of native TextDecoder and TextEncoder. This can be achieved through the following steps:
|
Coming from this thread, check in the end of October if there is anything in the bundle that can be removed. We can see how big of a problem this is and evaluate if its worth to create some automatic check
Original issue #48978
The text was updated successfully, but these errors were encountered: