Meteor server restart time - meteor

I'm on Meteor version 1.2.1. Whenever Meteor detects a change to backend code it restarts the server. You'll see a spinning character in the console, maybe some other messages depending on what packages you have installed and then:
=> Meteor server restarted
It takes around 7 seconds on my 4-year-old Macbook Pro.
I started working on an existing app which has around 20 JavaScript files and around 20 third-party packages installed (see package list below). It takes 30sec to restart the server after any change to server-side code.
Before I go digging in seeing what I can remove to speed things up I wanted to ask if these numbers (7 sec for an empty app and 30sec for a moderate sized app) seem normal, is this roughly what other meteor developers are experiencing or do I have something weird going on?
Does anyone have an idea of the the impact a new computer would have on build times?
Any tips for troubleshooting? Should I experiment with removing packages first or are there other aspects of my setup that are likely to have a bigger impact?
Thanks!
$ meteor list
angular 1.2.2 Everything you need to use AngularJS in your Meteor app
angular:angular-messages 1.4.7 AngularJS (official) release. For full solution: http://angular-meteor.com/
angular:angular-mocks 1.4.7 AngularJS (official) release. For full solution: http://angular-meteor.com/
angularui:angular-ui-router 0.2.15 angular-ui-router (official): Flexible routing with nested views in Angu...
check 1.1.0 Check whether a value matches a pattern
chrismbeckett:toastr 2.1.2_1 Gnome / Growl type non-blocking notifications
coffeescript 1.0.11 Javascript dialect with fewer braces and semicolons
cordova:com.ionic.keyboard 1.0.4
cordova:com.plugin.datepicker https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git#1e0f4bf47b0c343...
cordova:uk.co.whiteoctober.cordova.appversion https://github.com/whiteoctober/cordova-plugin-app-version.git#22e8147c51a168c0c...
driftyco:ionic 1.1.0_2 Ionic Framework official Meteor package
ejson 1.0.7 Extended and Extensible JSON library
fourseven:scss 3.2.0* Style with attitude. Sass and SCSS support for Meteor.js (with autoprefix...
ground:db 0.3.14 Ground Meteor.Collections offline
http 1.1.1 Make HTTP calls to remote servers
jquery 1.11.4 Manipulate the DOM using CSS selectors
logging 1.0.8 Logging facility.
matb33:collection-hooks 0.8.1 Extends Mongo.Collection with before/after hooks for insert/update/remove...
meteor-base 1.0.1 Packages that every Meteor app needs
meteoric:ionic-sass 0.3.0 Ionic's CSS Framework in SASS and bundled for Meteor.
mobile-experience 1.0.1 Packages for a great mobile user experience
mongo 1.1.3 Adaptor for using MongoDB and Minimongo over DDP
netanelgilad:ng-cordova 0.1.13 AngularJS Cordova wrappers for common Cordova plugins.
random 1.0.5 Random number generator and utilities
reload 1.1.4 Reload the page while preserving application state.
sanjo:jasmine 0.20.2 Velocity integration of the Jasmine testing framework
session 1.1.1 Session variable
spacebars 1.0.7 Handlebars-like template language for Meteor
standard-minifiers 1.0.2 Standard minifiers used with Meteor apps by default.
stevezhu:lodash 3.10.1 A utility library delivering consistency, customization, performance, & ...
tracker 1.0.9 Dependency tracker to allow reactive callbacks
velocity:html-reporter 0.9.1 Reactive Velocity test reports in your app.

Related

what is the proper package selection for using dc.js charting library with meteor

I'm trying to put together a meteor app, which uses dc.js charting library.
I have added chrts:dc package. My meteor list is:
autopublish 1.0.4 (For prototyping only) Publish the entire database to all clients
blaze-html-templates 1.0.1 Compile HTML templates into reactive UI with Meteor Blaze
charts:dc 1.7.4 Multi-Dimensional charts built to work natively with crossfilter rendered with d3.js (dc.js)
ecmascript 0.1.6* Compiler plugin that supports ES2015+ in all .js files
ejson 1.0.7 Extended and Extensible JSON library
es5-shim 4.1.14 Shims and polyfills to improve ECMAScript 5 support
insecure 1.0.4 (For prototyping only) Allow all database writes from the client
jquery 1.11.4 Manipulate the DOM using CSS selectors
meteor-base 1.0.1 Packages that every Meteor app needs
mobile-experience 1.0.1 Packages for a great mobile user experience
mongo 1.1.3 Adaptor for using MongoDB and Minimongo over DDP
session 1.1.1 Session variable
standard-minifiers 1.0.2 Standard minifiers used with Meteor apps by default.
tracker 1.0.9 Dependency tracker to allow reactive callbacks
When I run the app, I get the following errors:
Uncaught ReferenceError: Template is not defined chart.js:8743
Cannot read property 'length' of null pfafman_crossfilter.js:560
Perhaps, anyone in the meteor community is using dc.js, and could give me a clear direction as to what packages should be added to make meteor work with dc.js
What I have done to solve this, was to load the actual original libraries (d3.js and crossfilter.js) instead of the smart package surrogaes. Just simply placed both libraries under app/client/lib, and this started to work together just fine.

Meteor jasmine-client-integration tests only run when app physically launched in browser

When I attempt to run the tests using
JASMINE_BROWSER=PhantomJS meteor --test
I get the following output from PhantomJS
[PhantomJS] TypeError: instanceof called on an object with an invalid prototype property.
at which point nothing happens unless I open the app in my browser and then the tests complete. Seems to be the same issue as this closed one. I should add that my only integration test at this point (to rule out PhantomJS issues) is
describe("jasmineTest", function(){
it("1 equals 1", function(){
expect(1).toEqual(1);
});
});
My versions are
$ meteor list
accounts-password 1.1.1 Password support for accounts
alanning:roles 1.2.13 Role-based authorization
dburles:google-maps 1.1.3 Google Maps Javascript API v3
fortawesome:fontawesome 4.4.0 Font Awesome (official): 500+ scalable vector icons, customizable via CSS, Retina friendly
imsky:holder 2.8.1 Holder uses SVG to render image placeholders entirely in browser.
insecure 1.0.3 Allow all database writes by default
iron:router 1.0.9 Routing specifically designed for Meteor
jquery 1.11.3_2 Manipulate the DOM using CSS selectors
manuelschoebel:wait-on-lib 0.3.0 Use Meteor Iron-Routers waitOn to load external javascript
materialize:materialize 0.97.0 Materialize (official): A modern responsive front-end framework based on Material Design
matteodem:easy-search 1.6.2 Easy-to-use search with Blaze Components (+ Elastic Search support)
meteor-platform 1.2.2 Include a standard set of Meteor packages in your app
meteorhacks:kadira 2.23.0 Performance Monitoring for Meteor
msavin:mongol 1.1.5 The insanely handy development package for Meteor.
nicolaslopezj:tabular-materialize 1.2.1 Datatables for large or small datasets in Meteor
peernohell:c3 1.1.3 C3 (0.4.10) charting library based on D3.
reactive-var 1.0.5 Reactive variable
sacha:spin 2.3.1 Simple spinner package for Meteor
sanjo:jasmine 0.17.0 Velocity integration of the Jasmine testing framework
stevezhu:lodash 3.10.1 A utility library delivering consistency, customization, performance, & extras.
useraccounts:iron-routing 1.12.1 UserAccounts package providing routes configuration capability via iron:router.
useraccounts:materialize 1.12.1 Accounts Templates styled for Materialize Css.
velocity:html-reporter 0.8.2 Reactive Velocity test reports in your app.
UPDATE
The instanceof called on an object with an invalid prototype property error seems to be resolved by using PhantomJS 2.
I have subsequently found a simple workaround for the client-integration tests not running, whereby I just move the client-integration tests to the client-unit directory. This, however, seems exactly that, a workaround. I would still like to know what is causing the problem, and how it can be resolved without my hacky workaround.
It turns out it is a bug, the issue is raised here

Management packages. What tool should I use?

I'm starting new app with meteor and I'm confuse when I have to install packages.
Meteor gives the possibility to install packages just like that:
meteor add <username>:<packagename>
Ok, very easy. The problem is that I would like use bower then, How I have to install the packages? For example angular.
meteor add urigo:angular
is the same as? what is the difference*? How I have to perform?
bower install angular
The logical conclusion could be use one of them, but I have seen in examples that they can be toguether.
*the package is recorded in different places, but the operation is the same?
With
meteor add <developer>:<packagename>
you add packages from the Meteor specific package database. Meteor packages are completely integrated into the Meteor eco-system and may contain both server and client side code.
You should use "meteor add" whenever possible.
To find Meteor packages you can use Atmosphere
Bower on the other hand is a framework independent package system for client side (mostly) JavaScript packages. It's not well integrated with Meteor - Although community packages exists to simplify usage of Bower packages with Meteor.
To answer you specific example:
meteor add urigo:angular
This command adds the Angular package of the Angular-Meteor project to your Meteor application. It's not only Angular but does also include some Angular services ($meteor) to provide integration of Meteor with Angular.
It even adds Angular support to the server side to some degree.
bower install angular
only downloads the official minified and non-minified javascript file of the latest Angular version for client side use.
You could use the Bower version with Angular but you wouldn't get the benefits of the integration.
While I don't use Bower myself, check out this package: https://atmospherejs.com/mquandalle/bower. I think it may help answer your question.

Distributions on Meteor package server

I'm trying to understand what the docs say about the meteor package server.
In addition to Isopacks, the Package Server contains distributions,
which are sets of packages that have been tested together by a release
engineer and that are known to work well together. For example, when
you use Meteor 1.0, you're using the METEOR distribution at release
1.0.
(https://www.meteor.com/services/package-server)
and
Other people can also publish their own distributions to the package
server as well. If developer alice published a distribution called
SPACE-ROCK, you could switch your project to it by typing something
like meteor update --release alice:SPACE-ROCK#1.2.
(https://www.meteor.com/projects)
I know I can browse packages thru meteor search ... or on atmosphere. But the distrubutions are not listed there.
Is there any way to search/list distributions published to the package server?
meteor search will show releases (I believe a 'distribution' is just a release), but from the documentation, I can't find any way to limit it to only show releases. Here's my result, as an example:
> meteor search
.... // literally all of the packages
Matching releases:
CORDOVA-PREVIEW An experimental release of meteor with Cordova support.
GITHUBBLE Release for githubble.meteor.com.
METEOR The Official Meteor Distribution
METEOR-CORE An experimental release of meteor.
WINDOWS-PREVIEW Preview of Meteor on Windows
diegosampaio:METEOR meteor 1.0.0 compatible
ekate:METEOR-SHOW Meteor Shows Things
ekate:REL-TEST test
ekate:TEST Packaging UX Wrangling
glasser:PUBLISHTEST Test release for isopack-cache branch.
glasser:TPS-PREVIEW Preview releases for tool performance and stability work.
glasser:UPDATE-TEST The official Meteor distribution.
konecty:METEOR meteor 1.0.0 compatible
lawshe:FULLPAGE Meteor smart package for FullPage.js. Create full screen pages fast and simple.

Play / SBT / com.typesafe.Config - Excluding the bundled com.typesafe.Config 0.2.1 classes and using the updated 0.4.1 Config

I have a an sbt multiproject (sbt 0.11.3) where one of the sub-projects is a PlayProject using play sbt-plugin 2.0.1) and another is my application logic. My application needs to use 0.4.1 version of com.typesafe.Config but I believe the play plugin seems to embed an older version 0.2.1 which causes a conflict when I perform a dist (create a jar) where one of the new methods does not exist in 0.2.1.
I want to know if there is a way I can exclude the old version and only have the new one. I have tired many methods without success (excludes, filtration[If I did that properly at all], etc..)
Thanks in advance to the wizard who either can tell me explicitly how to make this happen, or the chap that tells me it isn't going to happen and why.
Answer:
There was not a good way. The only way was to open the jar remove the config classes in akka and repackage. This was not going to work for us, so I used the older version of the config.

Resources