Seriously you need to fix your build system


#1

When we started our application the build times where fast but now with some npm dependencies and some browserify files, it is taking a lot of time for us to build. Sometimes it takes about 10-15 minutes just to start an app. Either we are doing something stupid or there are issues with build system.


[Poll] Meteor Prototyping Edition
#2

Yes current load / build times can definitely be painful - see How long are your reload times?.

MDG is working on it though - see Help us test build times in Meteor 1.3.

If you want faster build times now, consider using webpack - see Meteor + React + WebPack?, and ultimately the referenced kickstarter webpack project kickstart-simple by thereactivestack.


#3

You might like this:


#4

Hey @miningsam

Whirlwind is intended for a different purpose, it allows you to run you CI tests faster, not the Meteor build. Only the MDG can fix that!


#5

Well, when MDG fixes build times I still hope they consult with you on a good build system name - Whirlwind sounds fast!!!


#6

@sam indeed, but while we are at the topic of faster build - couldn’t resist to post this gem :blush:


#7

Just took 25 minutes for me. Half of it was for the “updating npm dependencies” part and I’m only using one npm package.


#8

updating npm dependencies is one thing. But it takes a lot of time to build for the web.browser than for the os itself. I came from Java and C++ world so build times of 5 minutes for a large app was ok with me but 15 minutes please MDG fix this thing.

I will give whirlwind a shot.


#9

Whirlwind is definitely not for speeding up the build problem you’re talking about, but it will bring down your CI build from 2 hours to 10m!


#10

@suhaila I don’t have such long built times, but our apps aren’t the same. :] If you want help, you should show your project, or list the packages you have, what you are doing (how are you using browserify, etc?).


#11

Below are my npm dependencies.

‘externalify’: EXTERNALIFY_VERSION,
‘material-ui’: MUI_VERSION,
‘react-tap-event-plugin’: ‘0.2.1’,
‘redux’: ‘3.0.5’,
‘validator’: ‘3.17.0’,
‘joi’: ‘6.10.1’,

and these are my packages

'react@0.14.3',
'kadira:flow-router@2.10.0',
'kadira:react-layout@1.5.2',
'raix:eventemitter@0.1.3',
'planettraining:material-design-icons-font@2.1.1_2',
'momentjs:moment@2.10.6',
'aldeed:simple-schema@1.5.0',
'mdg:validated-method@0.2.0',
'dburles:collection-helpers@1.0.4',
'meteorhacks:npm@1.5.0',
'shcherbin:flex-grid@1.0.5',
'underscore@1.0.4',

#12

Right now i did a meteor reset and after starting the application it is stuck at Linking for last 10 minutes.


#13

Which version of Meteor are you on? Where/how are those NPM packages installed? You’re using browserify how?


#14

We are on 1.2.1 versions and using cosmos:browserify package. We are using Npm.depends from meteor for npm packages installation.


#15

The build system is a pain for agile work. We use a webpack integration right now but still have a huge first start up time.

For people who experience extreme build times on linking or building for web: After 1.2 all js is processed by the ecmascript package, which is extremely slow. If you happen to have large libraries in your app, consider renaming them to *.es5.js so they don’t get processed again.

There is an issue… but nothing was really done about it

Still, for web unacceptable slow


#16

@suhaila I’ve similar lag problems with cosmos:browserify. You might be encountering the same issue: https://github.com/elidoran/cosmos-browserify/issues/17

Why are you using cosmos:browserify? Now that Meteor 1.3 has introduced ES2015 modules, you can use that instead. Thread with links on how to use Meteor 1.3 Beta: Meteor 1.3 *early beta* now available


#17

I am using 1.2.1 for a production app so until we have 1.3 RC at least i cannot use it. Anyways it seems we will just have to wait for 1.3.


#18

Never seen build times anything like this. Maybe time for hardware upgrade?


#20

@suhaila @Dan put your Npm.depends on a separate local package and include it.

Example:

package.js

Package.describe({
  name: 'react-npms',
  summary: 'React NPM´s',
  version: '0.1.0',
});

Npm.depends({
  'react-tabs': '0.5.1'
});

Package.onUse(function (api) {
  api.use('cosmos:browserify@0.9.3');
  api.addFiles('package.browserify.js', 'client');
  api.export(['ReactTabs'], 'client');
}); 

package.browserify.js

ReactTabs = require('react-tabs');

If yout put Npm.depends on same package that your are develop cosmos:browserify will rebuild all npm´s on file change and this is slow.

Maybe @sashko must add this tip to Meteor guide.


#21

Actually i already did what you suggested and it does work on subsequent builds with file changes but if i make any changes to npm or the package that contains browserify i have to wait a long time for the build to finish.