Highlighted

How to use Google Closure Compiler (GCC) in AEM

Avatar

Avatar

jakeg58042588

Avatar

jakeg58042588

jakeg58042588

01-12-2017

Hey everyone, new to the forum here. I wanted to share an internal talk I did in my company about using Google Closure Compiler (GCC) in AEM. Hope you enjoy!!! Let me know if you have any questions or feedback.

Google Closure Compiler in AEM - YouTube

Replies

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

01-12-2017

Thank you for posting this great community content! We will mark as Featured Content!

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K
kautuk_sahni
Community Manager

03-12-2017

This is an excellent community content!! Thanks for sharing it!!

Highlighted

Avatar

Avatar

bobkranson

Avatar

bobkranson

bobkranson

05-12-2017

So the presentation describes that the min:gcc is built into AEM 6.2.  When I fired up my 6.3 environment and looked at Library Manager it still is using min:yui.  Is this an oversight or a preferred default for migrated systems?

Highlighted

Avatar

Avatar

jakeg58042588

Avatar

jakeg58042588

jakeg58042588

05-12-2017

Bob, that's correct. Someone at Adobe can correct me if I'm wrong, but I imagine it is a preferred default because they didn't want to surprise anyone. If you are migrating, you probably want to leave it alone, unless you want to enable your FE devs to write newer JavaScript.

Highlighted

Avatar

Avatar

itskiran2000

Avatar

itskiran2000

itskiran2000

04-06-2020

That's a very helpful talk on GCC thanks for that, Is it still the case though with GCC? does it still not support CSS minification/compression?

Default YUI compression for CSS is causing a strange issue in our project whenever a build deployed pages don't respond at all for quite a while, when I looked at the error log and in the thread dump it showed an error at line where we included a headlib script with our CSS client lib in it. HtmlLibraryManagerImpl is quite a bit of time to build the CSS lib with YUI when switched to GCC it's almost instant please look at the log below. so I just tried setting the compressor to GCC for CSS and it worked I no longer see the issue and pages load immediately after the deployment. Can someone from Adobe confirm if GCC is wokring here even for CSS? or it's just skipping YUI? If it's skipping what's really minifying it? because I see the info log sayting minified even when used GCC.


With YUI:

01.06.2020 19:18:31.968 INFO [0:0:0:0:0:0:0:1 [1591019311637] GET /content/test/pixel.910-005768.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl Start building CSS library: /apps/testing/clientlibs/testing-pagelibs (minified)
01.06.2020 19:19:31.639 INFO [oak-repository-executor-1] com.adobe.granite.repository Service [20071, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED
01.06.2020 19:19:31.641 INFO [oak-repository-executor-1] com.adobe.granite.repository Service [20072, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED
01.06.2020 19:19:31.642 INFO [oak-repository-executor-1] com.adobe.granite.repository Service [20073, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED
01.06.2020 19:19:31.652 INFO [oak-repository-executor-1] com.adobe.granite.repository Service [20074, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED
01.06.2020 19:19:31.691 INFO [oak-repository-executor-1] com.adobe.granite.repository Service [20075, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED
01.06.2020 19:19:31.968 INFO [oak-repository-executor-1] com.adobe.granite.repository Service [20076, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent REGISTERED
01.06.2020 19:30:11.447 INFO [0:0:0:0:0:0:0:1 [1591019311637] GET /content/test/pixel.910-005768.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl finished building library /apps/testing/clientlibs/testing-pagelibs.css ** **

With GCC:

02.06.2020 20:17:09.697 INFO [0:0:0:0:0:0:0:1 [1591109229433] GET /content/test/pixel.910-005768.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl Start building CSS library: /apps/testing/clientlibs/testing-pagelibs (minified)
02.06.2020 20:17:09.727 INFO [0:0:0:0:0:0:0:1 [1591109229433] GET /content/test/pixel.910-005768.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl finished building library /apps/testing/clientlibs/testing-pagelibs.css