These are chat archives for systemjs/systemjs

1st
Sep 2015
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:07
@amatiasq I believe right now you need "defaultJSExtensions": true, in your config.js.
Rob Wormald
@robwormald
Sep 01 2015 03:13
@Ablu @jiaweihli you should either use jspm to build your stuff into system.register, or use pure es6 output from TS
TS's System.register output is pretty weird right now
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:22
@robwormald What is wrong with TS's System.register?
TS > ES5 + System module works fine for me.
With runtime transpilation and JSPM bundling.
Rob Wormald
@robwormald
Sep 01 2015 03:23
bundled?
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:23
Yeah.
That is the scaffold I am using.
I have built a substantial sized app around the premise.
Rob Wormald
@robwormald
Sep 01 2015 03:24
right but is that using tsc -> modules: 'register' ?
err modules: 'system'
or whichever it is, i never remember
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:24
Correct. (system)
Is that not what you were talking about?
{
    "compilerOptions": {
        "target": "es5",
        "module": "system"
    }
}
Rob Wormald
@robwormald
Sep 01 2015 03:25
using jspm + ts works fine for me, but having TSC output first then bundling didn't. tho i hadn't tried it recently.
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:25
Oh. Sorry.
I think I understand.
I have no pre-bundle build step.
Rob Wormald
@robwormald
Sep 01 2015 03:26
yeah - that works super well for me
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:26
I only have runtime transpilation setup so JSPM does the bundle.
I have never tried bundling after tsc > ES5.
Rob Wormald
@robwormald
Sep 01 2015 03:26
yeah, that blows up
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:26
Gotcha.
Though, now that I have been doing runtime transpilation I can't see myself going back.
Not without a pretty compelling reason.
Rob Wormald
@robwormald
Sep 01 2015 03:27
(its an unnecessary step, but back in the old days (like, 3 months ago) it was a bit of a PITA
Micah Zoltu
@MicahZoltu
Sep 01 2015 03:27
Heheh.
Yeah.
Rob Wormald
@robwormald
Sep 01 2015 03:27
yeh i'm the same. runtime xpile is more than fast enough for me during dev
Rob Wormald
@robwormald
Sep 01 2015 03:35
TS is supposed to get built in bundling in 2.0, iirc
Sean Anderson
@MeoMix
Sep 01 2015 04:12
Hummmm.
Converted project from RequireJS to JSPM/SystemJS. It's a relatively large project, 90 modules are loaded. They're all cached on my filesystem (chrome extension - all read as size (from cache)). Load time went from .7s to 7s. I'm looking into pre-compilation, but ran into known perofrmance bugs with grunt-contrib-watch resulting in my compiled directory not always being synced. Is there any merit in digging into the performance of SystemJS' loader stuff, or is having everything compiled into one module ahead of time the only true solution?
Sean Anderson
@MeoMix
Sep 01 2015 04:19
Ehhh, it's actually babel's fault I think. After transpiling, but without bundling, load time is 1.2s
Micah Zoltu
@MicahZoltu
Sep 01 2015 04:23
@MeoMix Runtime transpilation can hurt performance depending on the power of the machine and the complexity of the project.
Though, 7 seconds on a modern machine seems quite slow.
That being said, JSPM bundle will do transpilation for you.
Sean Anderson
@MeoMix
Sep 01 2015 04:23
Rockin' 32GB of RAM, decent specs on an SSD etc
Rob Wormald
@robwormald
Sep 01 2015 04:24
you definitely don't want runtime transpilation in production
Sean Anderson
@MeoMix
Sep 01 2015 04:24
I'm aware.
I'm not trying to do that.
I have a bundling process. I'm just trying to not have to have an always-running watch task detecting files being added/removed/changed and re-transpiling
but I can't dev with the slowness of the runtime transpilation
Rob Wormald
@robwormald
Sep 01 2015 04:25
do you have a lot of deps? you could build a bundle of that stuff, and just xpile your app code
part of the issue can be the hierarchy of loading - you end up with several "batches" of requests
and (silly question) are you mixing requireJS and es6?
Sean Anderson
@MeoMix
Sep 01 2015 04:28

Not many external deps: jQuery, lodash, backbone, backbone.marionette. The modules load in 1.2s when transpiling has been done ahead of time (but they haven't been bundled) and 7s when transpiling is being done JIT.

I'm not mixing RequireJS and ES6. I've removed my dependency on RequireJS entirely

Rob Wormald
@robwormald
Sep 01 2015 04:30
seems slowfosho, especially since jq etc dont' really need transpiling
Sean Anderson
@MeoMix
Sep 01 2015 04:31
Yeah. I added the entire external libs folder to babel's exclude filter just to be safe and it didn't impact the perf at all
and I set babel's loaders to only use es6.module and nothing else and that didn't impact, either.
Rob Wormald
@robwormald
Sep 01 2015 04:32
for giggles, try using traceur for runtime transpilation. curious how big the diff
Sean Anderson
@MeoMix
Sep 01 2015 04:32
sure
wow
3.6s
Rob Wormald
@robwormald
Sep 01 2015 04:36
yikes
Sean Anderson
@MeoMix
Sep 01 2015 04:38
lets try typescript :D
Rob Wormald
@robwormald
Sep 01 2015 04:39
yolo
Sean Anderson
@MeoMix
Sep 01 2015 04:39
2.6s
Rob Wormald
@robwormald
Sep 01 2015 04:39
interesting. MS wins again/
Sean Anderson
@MeoMix
Sep 01 2015 05:43
I figured it out :(
It was right under my nose.
jspm depcache
A. Matías Quezada
@amatiasq
Sep 01 2015 08:39
@Zoltu that was it, thank you so much!
Peter Müller
@Munter
Sep 01 2015 14:02
sfxGlobals option What is this?
How do I use it?
Davis Kim
@davis
Sep 01 2015 18:47
whoa just realized i was in system js channel, not marionette. hello there @MeoMix
Rob Wormald
@robwormald
Sep 01 2015 19:26
@MeoMix did you run into any CSP issues, out of curiousity?
Per Svensson
@Psvensso
Sep 01 2015 19:45
just managed to get HTTP2 push to play with system-js builder to push down package deps to client..... but i just dont see any performance gain. And the dev tools are not really up to speed so can really tell if it working either..... anyone else been playing with http2/SPDY and packages?
Jonathan Cremin
@kudos
Sep 01 2015 20:01
@Psvensso performance gain over what?
you won’t see a simple performance gain over bundling