Legacy Knowledge Base
Published Jul. 2, 2025

Limitations in SASS Preprocessing in Theme Generation

Written By

Justin Choi

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

This article documents the limitations for resolving potential startup performance issues when deploying custom themes and portlets in DXP 7.0. Note: the limitations are found only in 7.0.

When using DXP 7.x, some developers noticed that after deploying their custom theme or portlet, the platform would take a long time to start. They noticed there was no resource cache like the ones in Liferay Portal to handle CSS file creation. Recall that SASS was implemented in Portal 6.2 to help manage CSS files but also had potential errors.

Despite the potential issues with SASS and jRuby in the legacy portal, you might have expected to see something similar in DXP where CSS files are processed when users are browsing (at runtime). This is not the case. One major difference between Liferay Portal 6.2 and DXP 7.0 is most notably because of how SASS is handled. See the links in the Additional Information Section for more information in DXP 7.0.

Resolution

Status: Limitation

DXP 7.0 functions in the following way:

  1. It is indeed true that the runtime generation of .sass-cache has been removed from DXP 7.0.
  2. On the other hand, Liferay DXP is still utilizing sass-cache; however, it is now happening at build time.
  3. For those interested in knowing how it works, the gradle task that generates the .sass-cache is buildCSS, which is implemented in the following class: https://github.com/liferay/liferay-portal/blob/master/modules/sdk/gradle-plugins-css-builder/src/main/java/com/liferay/gradle/plugins/css/builder/BuildCSSTask.java.

The overall result: Generating the .sass-cache values do not add additional delays when visiting the pages and there is little else that can be done to improve performance. No other settings are required to speed up the process for building or deploying modules.

Remember that there are other factors that affect overall performance, such as time to pre-compile JSPs, minification, whether SPA is enabled, the app server cache, or connecting to LDAP. Also keep in mind that there are other ways to improve performance; perhaps increasing the number of nodes in a cluster, JVM settings such as garbage collection, or tuning the load balancer.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base