-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[PoC] JS Combiner #3988
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
[PoC] JS Combiner #3988
Conversation
|
@rullzer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nickvergessen, @LukasReschke and @bartv2 to be potential reviewers. |
30e787f to
a033cef
Compare
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Codecov Report
@@ Coverage Diff @@
## master #3988 +/- ##
============================================
+ Coverage 54.23% 54.24% +<.01%
- Complexity 21231 21272 +41
============================================
Files 1308 1310 +2
Lines 81080 81214 +134
Branches 1284 1284
============================================
+ Hits 43974 44051 +77
- Misses 37106 37163 +57
Continue to review full report at Codecov.
|
|
Ready for review! |
|
I checked out the jscombiner branch - but there is no visible difference to master when loading the files pages. Both perform 198 requests. What am I missing? I guess I have to define which js files should be aggregated somewhere? But how? |
As this is a PoC - Proof of Concept - for now only 3 files are combined into one. Be patient we are working on it. |
MorrisJobke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and works 👍
We will add more combined files once we have this merged. Then we can easily add more combined stuff step by step. |
|
Follow-up for the file list at #4038, removes 26 requests. |
|
Follow-up for comments at #4039, removes 6 requests. |
|
Follow-up for files_versions at #4040, removes 3 requests. |
|
Follow-up for systemtags at #4041, removes 7 requests. |
|
Good job, this is awesome 🚀 |
|
Follow-up for sharing backend JS at #4042, removes 8 requests. |
|
Follow-up for template prepend core JS at #4043, removes 14 requests. |
|
Follow-up for notification JS at nextcloud/notifications#66, removes 2 requests. |
|
Follow-up for files_texteditor at nextcloud/files_texteditor#32, removes 2 requests. |
|
Follow-up for gallery at nextcloud/gallery#225, removes 31 requests. |
|
Follow-up for login view at #4044, removes 2 requests. |
Simple PoC for the JSCombiner
current situation: We load a crapload of javascript files. Often an app will always loads the same files. And because we are not animals we split code between multiple files. However this leads to poor utilisation
This PoC shows the JSCombiner (pattent pending). Developers can create a json file that just lists all the files that can be combined (in order). Then the process is basically similar to the way we handle combining of SCSS files.
This means we can start combining js files to significantly reduce the number of requests on page load.
TODO: