Js_resolve_modules load time is high

Hi Guys, in Liferay 7.4 U60 js_resolve_modules taking lot of time to load the page and causing components dropped on the page like CX taking time to come up. I have seen this optimised in 2025 Q1. Is there any way to improve loading time of js_resolve_modules in U60 . Below is the screenshot for reference .

Please refer below.

Blank page below where no components are dropped.

Hi there :waving_hand:

I don’t see how 60-80 ms can be “a lot of time” :thinking:

It’s true that in the next versions of DXP we have been moving from AMD to Browser Modules, making all this resolution stuff unneeded, but the times you are seeing for js_resolve_modules in this case are perfectly normal.

I’d suggest posting a full network trace (not filtered by Fetch/XHR) to see what’s exactly causing the slowness.

any front end CX dropped on the page appears after all js_resolve_modules loaded

I cannot access the URL, it’s behind some firewall, apparently. In any case, what you describe is the correct behaviour. Until the page is loaded the CX won’t start. That is because the CX cannot run if the portlets, the layout, and the infrastructure of the page has not been loaded yet.

Customer is expectation that CX should load as soon as user landed on the page

Because of the reasons explained above, the expectation is wrong. This would be like wanting Firefox to start before the operating system has fully booted.

since calls are sequential

Maybe (but only maybe) you can achieve higher concurrency by turning HTTP/2 on, which allows more parallel connections from the browser to the server. If that was the bottleneck (the maximum concurrent connections) you should see an increase in performance.

If you don’t see any increase in performance then the problem lies in the structure of the page. In other words, the page “is slow” (I don’t think 1-2 seconds is typically slow for a web site but that depends on the requirements of the project, obviously).

You could try making the page leaner and/or caching stuff aggresively. You could even cache the js_resolve_modules in a CDN. As long as nothing new/modified is deployed in the server the js_resolve_modules responses will remain the same because they simply depend on the npm dependency graph.