This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Sep 18, 2013, 10:37 AM
2 Posts

Dojo 1.8 and AMD slowing things down with too many HTTP requests

  • Category: Domino Server
  • Platform: All Platforms
  • Release: 9.0
  • Role: Administrator,Developer
  • Tags: xPages,Dojo,AMD
  • Replies: 2

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. 

Sep 20, 2013, 2:47 PM
2 Posts
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.

If you consider the following xPage source:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources>
<xp:dojoModule name="dijit.form.TextBox"></xp:dojoModule>
<xp:dojoModule name="dijit.form.Textarea"></xp:dojoModule>
<xp:dojoModule name="dijit.form.Number"></xp:dojoModule>
<xp:dojoModule name="dijit.form.ComboBox"></xp:dojoModule>
</xp:this.resources>
Testing 123
</xp:view>
 

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.

 

Cheers

Alex

 

 

 


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal