Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Boost: Chunk concatenated JS/CSS urls #40365

Open dilirity opened 3 days ago

dilirity commented 3 days ago

There's a limit of a 150 files when doing concatenation:

https://github.com/Automattic/jetpack/blob/52e377bdde5e87bfc088358a1869c9d6535adbbb/projects/plugins/boost/app/lib/minify/functions-service.php#L153

If there are more than 150 files, the user would get a 400 error and their page would be broken:

https://github.com/Automattic/jetpack/blob/52e377bdde5e87bfc088358a1869c9d6535adbbb/projects/plugins/boost/app/lib/minify/functions-service.php#L202-L204

We should start a new chunk as soon as the limit is hit when creating the URL here:

https://github.com/Automattic/jetpack/blob/52e377bdde5e87bfc088358a1869c9d6535adbbb/projects/plugins/boost/app/lib/minify/Concatenate_JS.php#L248

https://github.com/Automattic/jetpack/blob/52e377bdde5e87bfc088358a1869c9d6535adbbb/projects/plugins/boost/app/lib/minify/Concatenate_CSS.php#L188

github-actions[bot] commented 3 days ago

OpenAI suggested the following labels for this issue: