These are chat archives for systemjs/systemjs

Jun 2016
Andrei Balmus
Jun 17 2016 09:49
@jakeNiemiec thank you a lot! this tutorial really helped me, I've set proxies and it works now :)
Jake Niemiec
Jun 17 2016 10:13
@abalmush 👌cheers.
Hi, I'm struggling with systemjs static build load performance. It takes several seconds on mobile to load my app. Anyone has looked into this and has thoughts/solutions?
Jake Niemiec
Jun 17 2016 14:41
@m-j It is only for development, systemjs-builder will roll your code into one compressed file
@jakeNiemiec I'm using jspm.bundleSFX which uses systemBuilder.buildStatic() underneath. Should I be doing stuff differently to speed things up? What I get by doing this is single, self-executable javascript file so I assumed that's the proper way to prepare app for production.
Jake Niemiec
Jun 17 2016 14:49
I’d reccomend the jspm/jspm room in the future. What jspm -v @m-j?
@jakeNiemiec 0.16.23 I know that JSPM uses systemjs underneath so I decided to go straight here. By I may try jspm as well.
Jake Niemiec
Jun 17 2016 15:45

@m-j see heresystemjs/systemjs#1325

Short answer: bundle the things what won’t change much, and separate the things that change often.

Soup answer: Imagine you have 2 barrels, one empty and filled with different vegetables. Now, you love cabbage, you eat it almost every day. You have a variety of different kinds of cabbages. Everyone knows that you don't eat an entire cabbage for a meal. When you go to grab some, you find your self digging around the other veggies to find the perfect piece of cabbage, cut a portion off, and toss it back in.

Now, it goes without saying, that you can save some time by having a dedicated barrel for all cabbages:

jspm bundle soupRecipe.js - cabbages.js soupWithoutTheCabbage.js --inject
^bundle everything according to soupRecipe.js into soupWithoutTheCabbage.js except the cabbages because those will change often. soupRecipe.js includes dependancies such as hotWater.js, jSpice and NaCl, things that are in most soups and will not change often. In this way, the rest is done for you.

Or you may decide to prepare all of it beforehand:

jspm build soupRecipe.js cabbageSoup.js
Cabbage soup mix. You can't reach in and take out the cabbages, if you want to change it, you have to start from the beginning.

Or you may want to store your ingredients in the exact order you need them:

jspm depcache soupRecipe.js -o allIngredientsInOrder.js
All of the ingredients are labeled 1, 2, 3..., you can add them quickly without thinking.

In your case you are rooting through a barrel, following arbitrary instructions. Worse than that, you store all of your vegetables in the shed out back, and you can only carry 3 ingredients at a time to your kitchen (http requests with your web browser).

If you want to throw all of your ingrediants back into one barrel and start over: jspm unbundle
I hope that's at least somewhat helpful.

Guy Bedford
Jun 17 2016 19:49
@m-j how large is your build file?
Sharon (Sean) Rolel
Jun 17 2016 23:55
what would be the easiest way to have meta config for production only?