-
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
[$500] ExpensiMark: large bundle size #31183
Comments
Triggered auto assignment to @abekkala ( |
Co-assigning myself to supervise, but this will be worked on by Michał Skałka from SWM, who will be invoicing us separately |
Maybe the first and easiest steps here are to:
|
Hi I’m Michał from Software Mansion, an expert agency, and I’d like to work on this issue |
No update from me, but @Skalakid keep me posted if you're starting to work on this |
not urgent, going to make @Skalakid the issue owner here |
This issue has not been updated in over 15 days. @Skalakid, @roryabraham eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Moving this back to weekly. We are hoping to launch this feature in January, so we should start making moves here too. @Skalakid is going to be focused on inline video, so we should find someone else to tag in on this. |
Would be great to have this for V1 but currently JS bundle of Live Markdown parser is 188 kB so it's not a blocker I guess. |
I'm going to make this external and accept proposals for open-source contributors to work on this. |
@kidroca I like the idea to just align the |
📣 @fedirjh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
It appears that E/App is already aligned with
Given this setup, for broader compatibility with other projects, we could consider moving Alternatively, if placing |
@roryabraham Also not sure why we overlooked the removal of |
I agree with @aswin-s's suggestion regarding the removal of the Removing the polyfill impacts the backward compatibility and potential technical debt for legacy systems. It might be beneficial to conduct a quick survey or analysis to determine how many such legacy projects are dependent on I am generally in favor of removing the polyfill, as it primarily affects projects running on very old versions of Node.js (older than 15), which are likely to be a minority if any |
📣 @aswin-s 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@roryabraham Not sure if this is the right place to ask, but since it also impacts the bundle size of ExpensiMark, I'll ask anyway. We have a really large regex to match valid TLDs. Although it doesn’t significantly impact browser or desktop environments, it takes a considerable amount of time to execute on mobile devices. On Android devices, the TLD matching, which is part of markdown parsing, takes around 3 seconds to execute, thereby blocking the UI. The execution time increases exponentially with size of the matching text. I was wondering if there is a specific reason for having such stringent TLD matching, or if it's just been retained for historical reasons. Simplifying this to a shorter regex pattern that checks the validity of the TLD pattern, rather than checking explicit domains, would reduce the bundle size by around 10KB and significantly increase regex execution speed. I would be interested in hearing your thoughts on this. Came across this while I was investigating performance issues in parsing markdown content in this issue. |
@abekkala pulling you back in to help manage payments here. @kidroca invoices us separately but I think we may need to create and upwork job for @aswin-s Edit: already done: #31183 (comment) |
PR was merged on Jan 15th. This one is ready for payment. |
@roryabraham I want to make sure I'm looking at the Correct PR. @aswin-s The PR above Expensify/expensify-common#632 is not showing merged to prod yet. once that happens the payment title for this GH will auto-update with the payment date |
@abekkala PR is merged to master in expensify-common repository. Melvin seems to be tracking PRs from Expensify/App repository only. @roryabraham Could you please confirm? |
Ah, sorry for the confusion here. @aswin-s can you please open an E/App PR to upgrade the expensify-common version we're using (otherwise the PR won't take effect). Then once that hit production we can issue payment. |
@abekkala @roryabraham Above PR has already hit PROD last week. |
@abekkala can we please issue payment of $500 to @aswin-s for Expensify/expensify-common#632 ? |
@roryabraham yes, I can send an upwork offer to @aswin-s |
PRs for this issue were reviewed internally |
@aswin-s payment sent and contract ended - thank you! |
Problem
A simple script that uses ExpensiMark library to parse Markdown into HTML has a bundle size of 336 kB (or 184 kB minified) which is quite big.
Details
The file is large because it contains mappings of all HTML entities (from
_.escape
) and countries, states, currencies etc. fromCONST.jsx
.Solution
Investigate if it's possible to minimize the bundle size.
Steps to reproduce
index.js
out.js: https://pastebin.swmansion.com/?9798f33833cc33b6#DRgiwxs8ujteamHaGDioSzZVZ83nuWUim3QabJ5PUYed
Issue Owner
Current Issue Owner: @SkalakidUpwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: