Skip to content

Split intl packages in smaller packages #49943

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

Closed
shyim opened this issue Apr 5, 2023 · 4 comments · Fixed by #50055
Closed

Split intl packages in smaller packages #49943

shyim opened this issue Apr 5, 2023 · 4 comments · Fixed by #50055
Labels

Comments

@shyim
Copy link
Contributor

shyim commented Apr 5, 2023

Description

Right now Symfony Intl package is 43MB, which makes all Applications really big
image

The problems for me are:

  • Packaging for Bref can be a problem as AWS has a limit of 250 MB (unzipped)
  • Waste of Traffic and Disk Space

Example

My ideas so far:

  • Create separate packages for the actual data emoji, locales, timezones and optin people for each feature (symfony/intl-data-emoji)
  • Or complete symfony/intl-emoji like split the repository on Intl level again
@stof
Copy link
Member

stof commented Apr 5, 2023

Given that the emoji data is different from the other data (it is used through a different infrastructure), it might make sense to split it in a separate package to reduce this size.

@andresayac
Copy link

I like the idea

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Apr 18, 2023

In #49970, I'm proposing to compress the data. But would it make sense to let you do the compression when needed? See #49970 (comment)

@alexislefebvre
Copy link
Contributor

alexislefebvre commented Apr 18, 2023

How do you imagine these packages?

How I see it: let's say that my website uses only English and French, so I do composer require symfony/language-pack-en symfony/language-pack-fr and I only have the necessary data for my project. And compression is not needed since these packages contain only a few files.

Would it require to much work and packages to maintain for Symfony?


Another idea: implement something like localepurge (see Ubuntu, Debian or ArchLinux) to remove all the translations that are not required by your app. It could be run after composer install so that less space is used on a server or the Docker image, packaged app, etc.

nicolas-grekas added a commit that referenced this issue Apr 18, 2023
…grekas)

This PR was merged into the 6.3 branch.

Discussion
----------

[Intl] Allow compressing emoji and data maps

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #49943
| License       | MIT
| Doc PR        | -

Resuming #49970, which was closed by mistake :)

Commits
-------

de6a74c [Intl] Allow compressing emoji and data maps
@OskarStark OskarStark changed the title Splitt intl packages in smaller packages Split intl packages in smaller packages Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants