OpenNTF / org.openntf.xsp.jakartaee

XPages Jakarta EE support libraries
Apache License 2.0
21 stars 5 forks source link

Investigate performance of resources served from PrimeFaces #456

Open jesse-gallagher opened 1 year ago

jesse-gallagher commented 1 year ago

It's been reported that resources reliably take a second per, even after the first load.

jesse-gallagher commented 1 year ago

Locally, it doesn't seem TOO bad, regardless of Development setting. Some of the resources take a quarter second, which could be nicer, but nothing wildly out of the ordinary.

Screenshot 2023-07-21 at 8 55 37 AM
slapraik-intec commented 1 month ago

Hi.

I tried changing the following from "Development" to "Production" and found it made a big difference.

When it was set to "Development" some pages issued 50 web requests to the server. However changing the setting to "Production" reduced the number down to 23 web requests, more requests were serviced from the browser cache and the page clearly loaded a lot faster.

I noticed the code is still setting "jakarta.faces.PARTIAL_STATE_SAVING=false". I tried changing this to "true" using a "context-param" setting in web.xml but did not see any difference. Could the setting in the code be overriding the setting in web.xml?

jesse-gallagher commented 1 month ago

It certainly makes sense that Development mode would slow things down in a lot of ways, like turning off resource aggregation in XPages. If we find anything that goes beyond just the sort of thing you'd expect, that may be trouble - I could see things like it ending up doing repeated NSF scanning when it's not necessary because the server knows the NSF didn't change.

As for the PARTIAL_STATE_SAVING param, something in web.xml should override it, so it's possible that MyFaces changed between major versions in a way where the setting isn't required anymore and doesn't make much difference. I'll have to try removing that setting to see how it behaves.