Has anyone else upgraded from 8.5.3 to 9 and noticed that xPages are now making much more HTTP requests?
Under 8.5 I used runtime optimization for JS and CSS (xsp.resources.aggregate=true) to reduce the number of HTTP requests when loading an xPage.
Under 9 I have this still selected and any JS or CSS I add is still aggregated but as Dojo 1.8 uses it’s own loader (AMD) you get loads of requests for things like language and calendar packs.
The long and short of it is that an xPage that would load in under a second (15 seperate HTTP requests) is now taking 6+ seconds (upto 75 HTTP requests).
I’m sure AMD can be very useful to pure Dojo development but it seems to have ruined my xPages.
Subject: Dojo 1.8 and AMD slowing things down with too many HTTP requests
Thanks for the response Egor, it’s nice to know there are actually still some Domino Developers out there.
Adding the Dojo modules to the xPage resources helps with the core JS but they are also the cause of the problem as secondary files that are required (language packs etc like gregorian.js).
The more you add the more HTTP hits on the server so a slower loading xPage. The point of the brilliant CSS and JS aggregation in 8.5.3 was that 8.5.0/1/2 apps were really slow as there were too many HTTP hits so they speeded the whole process up by getting the server to decide what libs were needed and creating one file with all of them in it and serving that file instead. It seems 9 has taken a step backwards on this as Dojo 1.8 is AMD based so there are much fewer classes in the core file and as domino does not know enough (or it wouldn’t work if it tried) to aggregate the modules then you get more HTTP hits.
Then you would think that something this simple would be the same or faster to load on 9 than 8.5 whereas in reality it’s quite a bit slower.
8.5 = 5 requests, 90k data, 321ms load time
9.0 = 10 requests, 122k data, 756ms load time
I’ll cross log this on StackOverflow and see if anyone has had any joy in using their own custom dojo builds on 9 servers which I think is the only solution.