Skip to content

Instantly share code, notes, and snippets.

View flippyhead's full-sized avatar

Peter T. Brown flippyhead

View GitHub Profile
| (#3) Profiling: ProjectContext prepareProjectForBuild
| Preparing to build package pathable-ui \
| ProjectContext prepareProjectForBuild.........................1,394 ms (1)
| ├─ _initializeCatalog...........................................467 ms (1)
| │ ├─ LocalCatalog#initialize...................................464 ms (1)
| │ │ ├─ addPatternsToList 9 ms (2)
| │ │ ├─ LocalCatalog#_computeEffectiveLocalPackages............270 ms (1)
| │ │ │ ├─ files.stat 6 ms (38)
| │ │ │ ├─ optimistic hashOrNull...............................257 ms (36)
| │ │ │ │ ├─ files.readFile 11 ms (27)
@flippyhead
flippyhead / performance-analysis.md
Last active January 11, 2017 20:27 — forked from nachocodoner/performance-analysis.md
Performance improvements on complex Meteor apps

Performance improvements on complex Meteor apps

We are developing what will become a fairly complex Meteor application that is replacing an existing Ruby/Rails application. This application has been in development for approximately one year, from Meteor 1.2.1 version to 1.4.2.3, which is the one we currently use. We use React.

The staging instance, hosted on Galaxy, is available here: http://admin.staging.pathable.com. Feel free to create a community.

Currently we face a few critical issues related to application size and initial load times. While the performance in development has recently become just barely tenable, the performance of the deployed, production application on Galaxy is not.

App and package infrastructure

First, here is a brief overview of our application structure and approach. You are welcome to have access to our GitHub repository access should you want to review our code directly.

export const create = new ValidatedMethod({
name: 'accounts.create',
validate: SignupSchema.validator(),
run({ email, password }) {
let userId;
if (Meteor.isClient) {
// this won't login the user even though it's running in the client
Accounts.createUser({ email, password }, (error) => {
if (!error) {
// so I thought I'd try this, but it also doesn't login the user
dates = {}
Template.documentsTable.rendered = ->
@autorun ->
Session.get 'query'
dates = {}
@autorun =>
page = (Session.get('limit') / 10) - 1
@$('#documents-table--table tbody tr:last')
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 56af2cc889f5cf252c00012f -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c4,c210' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255 .Last 10 kB of build output: info preinstall qs@0.5.6 npm info postinstall cryptiles@0.1.3 npm info build /var/lib/openshift/56af2cc889f5cf252c00012f/app-root/runtime/repo/node_modules/jitsu/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/request/node_modules/qs npm info linkStuff qs@0.5.6 npm info install qs@0.5.6 npm info postinstall qs@0.5.6 npm info preinstall sntp@0.1.4 npm info build /var/lib/openshift/56af2cc889f5cf252c00012f/app-root/runtime/repo/node_modules/jitsu/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/request/node_modules/hawk/node_modules/sntp npm info linkStuff sntp@0.1.4 npm info install sntp@0.1.4 npm info postinstall sntp@0.1.4 npm info preinstall boo
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 56af2cc889f5cf252c00012f -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c4,c210' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255 .Last 10 kB of build output: info preinstall qs@0.5.6 npm info postinstall cryptiles@0.1.3 npm info build /var/lib/openshift/56af2cc889f5cf252c00012f/app-root/runtime/repo/node_modules/jitsu/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/request/node_modules/qs npm info linkStuff qs@0.5.6 npm info install qs@0.5.6 npm info postinstall qs@0.5.6 npm info preinstall sntp@0.1.4 npm info build /var/lib/openshift/56af2cc889f5cf252c00012f/app-root/runtime/repo/node_modules/jitsu/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/request/node_modules/hawk/node_modules/sntp npm info linkStuff sntp@0.1.4 npm info install sntp@0.1.4 npm info postinstall sntp@0.1.4 npm info preinstall boo
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 56af2cc889f5cf252c00012f -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c4,c210' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255 .Last 10 kB of build output: info preinstall qs@0.5.6 npm info postinstall cryptiles@0.1.3 npm info build /var/lib/openshift/56af2cc889f5cf252c00012f/app-root/runtime/repo/node_modules/jitsu/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/request/node_modules/qs npm info linkStuff qs@0.5.6 npm info install qs@0.5.6 npm info postinstall qs@0.5.6 npm info preinstall sntp@0.1.4 npm info build /var/lib/openshift/56af2cc889f5cf252c00012f/app-root/runtime/repo/node_modules/jitsu/node_modules/flatiron/node_modules/broadway/node_modules/winston/node_modules/request/node_modules/hawk/node_modules/sntp npm info linkStuff sntp@0.1.4 npm info install sntp@0.1.4 npm info postinstall sntp@0.1.4 npm info preinstall boo
native _begin();
native do
##include <Adafruit_GPS.h>
SoftwareSerial my_Serial(8, 7);
Adafruit_GPS GPS(&my_Serial);
void begin() {
Serial.begin(9600);
native _begin(), _read(), _GPS;
native do
##include <Adafruit_GPS.h>
##include <SoftwareSerial.h>
SoftwareSerial my_Serial(8, 7);
Adafruit_GPS GPS(&my_Serial);
void begin() {
native _begin(), _read(), _GPS;
native do
##include <Adafruit_GPS.h>
##include <SoftwareSerial.h>
SoftwareSerial my_Serial(8, 7);
Adafruit_GPS GPS(&my_Serial);
void begin() {