Open douglasduteil opened 8 years ago
Here comes the raw results
'use strict'
module.exports = {
root: __dirname,
ssl: true
}
'use strict'
module.exports = {
root: __dirname,
ssl: true,
transformer: {
files: {
pattern: [
'src/*.js'
]
}
},
system: {
configFile: './config.js',
depCache: ['css', 'babel', 'src/main.js']
}
}
'use strict'
module.exports = {
root: __dirname,
ssl: true,
system: {
configFile: './config.js',
depCache: [],
bundles: [
'css + src/main - [src/**/*] - [src/**/*.css!]',
]
}
}
Following https://github.com/jspm/jspm-cli/issues/872 #4 #29
This is very enlightening. The lack of a speed up here seems like it may be due to:
browser.js
file which is the largest finishes last.It seems like there is the potential here for a big performance boost if the server was aware of the dependency tree priorities and optimized the HTTP/2 transport itself to ensure critical resources are transferred first. For example, simply raising the priority of babel here would likely reduce time significantly.
Hi there @guybedford it's been a while now. Sorry... I'm back now.
Did something change on this subject ? I would like to tackle it but I can't find how. You were saying (5 month ago) that
It seems like there is the potential here for a big performance boost if the server was aware of the dependency tree priorities and optimized the HTTP/2 transport itself to ensure critical resources are transferred first.
- Can
systemjs-builder#trace
functions be use to extract the priority of a dependency (through the depth of this dependency) ?- Is it
systemjs
in depcache mode that from the client sends the requests with priorities inside the header ?
Looking forward to work with you again :) Douglas.
@douglasduteil nice to hear you're interested in some experimenting here. Yes SystemJS builder trace contains everything that is needed to know about the tree to handle prioritisation as it provides the graph. Reading that graph can be seen in for example https://github.com/systemjs/builder/blob/master/lib/compile.js#L148.
SystemJS depcache effectively does equal prioritisation, but because all loads are on the critical path it's mostly ok. Where a prioritised depCache would help is for plugin loads, see https://github.com/systemjs/systemjs/issues/263.
Another big thing for speedup is server-side precompilation of the SystemJS translate hook. I've been working on a test for this in https://github.com/guybedford/karma-systemjs-experiment which you may find interesting as well.
I'm doing my own experimentation in a fork The goal is to provide an server capable of
I publish my result on npm so we can test stuff. douglasduteil...jspm-server