I'm playing around with system.js (inspired by angular2 using it for their tutorials), but I get ridiculously bad performance even for the most trivial sample.
For example the following code has a delay of 26000ms(!) between the second (the one before System.import
) and last (in app.js
) console.log while running locally (so no network delay)
index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<title>System.js Sample</title>
<script>console.log("1: " + new Date().getTime());</script>
<script src="bower_components/system.js/dist/system.js"></script>
</head>
<body>
<script>
console.log('2: ' + new Date().getTime());
System.import('app.js');
</script>
</body>
</html>
App.js:
console.log('3: ' + new Date().getTime());
I installed the newest system.js version via bower ("system.js": "~0.18.17") and removed all the remaining code it's really just the System.import call that takes ages. So what am I doing wrong?
Picture of the Network tab when loading the page under Chrome: