kadirahq / fast-render

Render you app even before the DDP connection is live. - magic?
MIT License
560 stars 80 forks source link

In local Dev environment, app takes over 30 seconds to refresh after saving changes #104

Open etmarch opened 9 years ago

etmarch commented 9 years ago

For some reason that I cannot put my finger on, when I add fast-render to my project, my app takes an incredibly long time to refresh/reload after saving changes (in local development). There are no errors being displayed, I have debug set to true, and i did not have this problem just a week ago. I am thinking its a conflict with an existing package I have? Here is the list of packages that I have added to this project:

accounts-base@1.2.0
accounts-facebook@1.0.4
accounts-oauth@1.1.4
accounts-password@1.1.0
alanning:roles@1.2.13
aldeed:autoform@4.2.2
aldeed:autoform-bs-button-group-input@1.0.2
aldeed:autoform-bs-datepicker@1.1.1
aldeed:autoform-select2@2.0.1
aldeed:collection2@2.3.2
aldeed:console-me@0.1.2
aldeed:simple-schema@1.3.1
aldeed:tabular@1.1.0
aldeed:template-extension@3.4.3
anti:i18n@0.4.3
aslagle:reactive-table@0.7.2
autoupdate@1.2.0
babrahams:editable-json@0.3.12
base64@1.0.3
binary-heap@1.0.3
blaze@2.1.0
blaze-tools@1.0.3
boilerplate-generator@1.0.3
callback-hook@1.0.3
ccorcos:transitioner@2.0.1
cfs:access-point@0.1.45
cfs:autoform@2.1.1
cfs:base-package@0.0.28
cfs:collection@0.5.5
cfs:collection-filters@0.2.4
cfs:data-man@0.0.6
cfs:ejson-file@0.1.4
cfs:file@0.1.16
cfs:filesystem@0.1.2
cfs:graphicsmagick@0.0.18
cfs:http-methods@0.0.27
cfs:http-publish@0.0.13
cfs:power-queue@0.9.11
cfs:reactive-list@0.0.9
cfs:reactive-property@0.0.4
cfs:s3@0.1.3
cfs:standard-packages@0.5.5
cfs:storage-adapter@0.2.1
cfs:tempstore@0.1.4
cfs:ui@0.1.3
cfs:upload-http@0.0.20
cfs:worker@0.1.4
check@1.0.5
chuangbo:cookie@1.1.0
coffeescript@1.0.6
dburles:collection-helpers@1.0.2
dburles:mongo-collection-instances@0.3.3
ddp@1.1.0
deps@1.0.7
ejson@1.0.6
email@1.0.6
facebook@1.2.0
fastclick@1.0.3
fortawesome:fontawesome@4.3.0
geojson-utils@1.0.3
gwendall:body-events@0.1.6
gwendall:session-json@0.1.7
gwendall:template-inspector@0.1.9
gwendall:template-states@0.1.0
html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
iamkevingreen:imagesloaded@1.0.4
id-map@1.0.3
iron:controller@1.0.7
iron:core@1.0.7
iron:dynamic-template@1.0.7
iron:layout@1.0.7
iron:location@1.0.7
iron:middleware-stack@1.0.7
iron:router@1.0.7
iron:url@1.0.7
joshowens:shareit@0.3.1
jquery@1.11.3_2
json@1.0.3
lai:collection-extensions@0.1.3
launch-screen@1.0.2
less@1.0.13
liberation:flash-telegrams@1.1.1
livedata@1.0.13
localstorage@1.0.3
logging@1.0.7
maclane:bootstrap-material-design@0.2.2
manuelschoebel:ms-seo@0.4.1
matb33:collection-hooks@0.7.11
matteodem:easy-search@1.5.2
meteor@1.1.5
meteor-platform@1.2.2
meteorhacks:inject-initial@1.0.2
meteorhacks:kadira@2.20.1
meteorhacks:kadira-binary-deps@1.3.1
meteorhacks:kadira-profiler@1.0.2
meteorhacks:meteorx@1.3.1
meteorhacks:picker@1.0.2
meteorhacks:sikka@1.0.1
meteorhacks:subs-manager@1.3.0
meteorhacks:unblock@1.1.0
meteorhacks:zones@1.4.0
meteortoys:toykit@0.2.2
minifiers@1.1.4
minimongo@1.0.7
mizzao:bootboxjs@4.4.0
mizzao:build-fetcher@0.2.0
mizzao:jquery-ui@1.11.2
mizzao:tutorials@0.6.6
mobile-status-bar@1.0.3
momentjs:moment@2.9.0
mongo@1.1.0
mongo-livedata@1.0.8
mpowaga:string-template@0.1.0
mrgalaxy:stripe@2.1.0
mrt:moment@2.8.1
mrt:nprogress@0.1.0
msavin:jetsetter@1.0.7
msavin:mongol@1.0.12
natestrauser:select2@3.5.1
npm-bcrypt@0.7.8_1
oauth@1.1.4
oauth2@1.1.3
observe-sequence@1.0.5
okgrow:iron-router-autoscroll@0.0.7
ongoworks:security@1.1.0
ordered-dict@1.0.3
peppelg:bootstrap-3-modal@1.0.3
perak:user-roles@1.0.10
percolate:momentum@0.7.2
percolate:velocityjs@1.1.0
prasad19sara:client-debugger@0.2.1
raix:eventemitter@0.1.2
raix:handlebar-helpers@0.2.4
raix:ui-dropped-event@0.0.7
rajit:bootstrap3-datepicker@1.4.1
random@1.0.3
reactive-dict@1.1.0
reactive-var@1.0.5
reload@1.1.3
retry@1.0.3
routepolicy@1.0.5
sacha:spin@2.0.4
service-configuration@1.0.4
session@1.1.0
settinghead:auto-nprogress@1.0.0
sha@1.0.3
smeevil:syntax-error-notifier@1.0.8
softwarerero:accounts-t9n@1.0.6
spacebars@1.0.6
spacebars-compiler@1.0.5
spiderable@1.0.7
srp@1.0.3
standard-app-packages@1.0.5
stylus@1.0.7
templates:array@1.0.3
templating@1.1.0
tracker@1.0.6
twbs:bootstrap@3.3.4
ui@1.0.6
underscore@1.0.3
url@1.0.4
useraccounts:bootstrap@1.8.1
useraccounts:core@1.8.1
velocityjs:velocityjs@1.2.1
webapp@1.2.0
webapp-hashing@1.0.3
wenape:soundmanager@0.1.0
yogiben:autoform-file@0.2.0
yogiben:autoform-modals@0.3.2
yogiben:favorites@0.0.4
yogiben:notifications@0.0.6
zimme:collection-behaviours@1.0.3
zimme:collection-timestampable@1.0.5
zimme:select2-bootstrap3-css@1.4.1

And this is a code snippet that I am using for all global subs (in time I will trim this down obviously):

Router.configure({
    templateNameConverter: "upperCamelCase",
    routeControllerNameConverter: "upperCamelCase",
    layoutTemplate: "layout",
    notFoundTemplate: "notFound",
    loadingTemplate: "loading",
    waitOn: function() {
        return [
            Meteor.subscribe('all_users_to_message'),
            Meteor.subscribe('favorites'),
            Meteor.subscribe('avatars'),
            Meteor.subscribe('cover_images'),
            Meteor.subscribe('images'),
            Meteor.subscribe('audios'),
            Meteor.subscribe("all_songs"),
            Meteor.subscribe("all_ads"),
            Meteor.subscribe("all_stations"),
            Meteor.subscribe("all_contracts")
        ]
    }
    //fastRouter:true // Fast render is acting very oddly when it comes to local development
});

I have also tried blocking/unblocking DDP with FastRender.debugger.blockDDP(), a well as pretty much every other debugging option, and I am still at a loss. After enough time, the app will load again fine, but its making it impossible to develop at a good pace, as I am waiting almost a minute sometimes for my app to refresh from changes to the code. Also, I noticed that it takes significantly longer in Chrome to reload than Firefox - not sure why either.

Here is the output from the console with debugging enabled:

FR: new subscription: _console
soundmanager2.js:1198SoundManager V2.97a.20140901 (HTML5-only mode)
soundmanager2.js:1198SoundManager 2 HTML5 support: mp3 = true, mp4 = true, ogg = true, opus = true, wav = true
soundmanager2.js:1198SoundManager 2: Ready. ✓
debugger.js:11FR: new subscription: all_users_to_message
debugger.js:11FR: sending fake ready for sub: all_users_to_message
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: favorites
debugger.js:11FR: sending fake ready for sub: favorites
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: avatars
debugger.js:11FR: sending fake ready for sub: avatars
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: cover_images
debugger.js:11FR: sending fake ready for sub: cover_images
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: images
debugger.js:11FR: sending fake ready for sub: images
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: audios
debugger.js:11FR: sending fake ready for sub: audios
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: all_songs
debugger.js:11FR: sending fake ready for sub: all_songs
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: all_ads
debugger.js:11FR: sending fake ready for sub: all_ads
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: all_stations
debugger.js:11FR: sending fake ready for sub: all_stations
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: all_contracts
debugger.js:11FR: sending fake ready for sub: all_contracts
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: new subscription: all_users
debugger.js:11FR: new subscription: favorites
debugger.js:11FR: sending fake ready for sub: favorites
debugger.js:11FR: injecting ddp message: Object {msg: "ready", subs: Array[1], frGen: true}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "users", id: "dHoy7wLtZmpAxKzqt", fields: Object}
debugger.js:11FR: actual subscription completed: all_users_to_message 5g2vLx2w6nN3rBCAu
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "favorites", id: "6k5fv7N6jdqoYEHnC", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "favorites", id: "hKosdhJp3CCDXwyie", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "favorites", id: "cf5RTZ6qyo5APhsrv", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "favorites", id: "ZiZS6j8ftsbktK5Co", fields: Object}
debugger.js:11FR: actual subscription completed: favorites wYPSfK3LvZEnJZXoQ
fsFile-common.js:233GET FILERECORD: tLSkMBj4W8wPi5WSJ
debugger.js:11FR: new subscription: song
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.avatars.filerecord", id: "G6i3N67qhp46dv7N2", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.avatars.filerecord", id: "2PZTJLpzsEixGZNJw", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.avatars.filerecord", id: "tLSkMBj4W8wPi5WSJ", fields: Object}
debugger.js:11FR: actual subscription completed: avatars Xn3uFea2YoEqutwze
debugger.js:11FR: actual subscription completed: cover_images oX3nsEr87x5wWaL42
debugger.js:11FR: new subscription: seoByRouteName
2fsFile-common.js:233GET FILERECORD: tLSkMBj4W8wPi5WSJ
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "g9mYRDL2y649FgaC4", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "ycy6QXynJM6mecsiL", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "4FwfMFmiBoCSe4Ab5", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "PA9gC8gyaSAPJ7HKk", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "CrjSqNuHdf8LJxjXa", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "cWaLtJNau44EccshQ", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "JJ5viyYiELgmzQmzB", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.songImages.filerecord", id: "Lc2Pdxdf3ajLRLeEY", fields: Object}
debugger.js:11FR: actual subscription completed: images EchtdaSDZYq5dciBe
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "ZRbKZzF5yAYRXM3SF", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "hCwX9ShabAYiNQqJW", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "yrPssqgDRC7SBtR2f", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "t4ahdE8EEjXX7KGA6", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "Cst5CpeoaCatKcTkQ", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "E5B7kffZ7N62CitPJ", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "toSJoRJ9LNrdu2x4f", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "cfs.audioFiles.filerecord", id: "9ksnQmMCvLzdybPHn", fields: Object}
debugger.js:11FR: actual subscription completed: audios qxEi2EaCdLmKRxWek
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "songs", id: "tw793oBSQ3kGePzQN", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "songs", id: "nLqyaFmmn7Xzj697M", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "songs", id: "dhNdjagHKWythzBEH", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "songs", id: "yQSfeMEtQi32XZAz3", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "songs", id: "pPp5RCtTexyiwv9bh", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "songs", id: "zLpnznqe8HLTRbDAA", fields: Object}
debugger.js:11FR: actual subscription completed: all_songs hNjkkJWhBnbhGMKFT
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "ads", id: "x3SjAwP7cAJA5YTar", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "ads", id: "SzG8yw4nZAn6KQJWz", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "ads", id: "iydvcZiZeQ9CaJQ3i", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "ads", id: "MrvngBFYGgk6FBaae", fields: Object}
debugger.js:11FR: actual subscription completed: all_ads acv9acQ6eXMxaxhxt
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "QG6oQfC6Fn2WieBiu", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "5uZxttbwpJxREbKTr", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "CjS54sDAh9j7gvooy", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "kL9LmGp4d5MNgYmW8", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "Yaa9fMWtMzBkYHh2n", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "qxT9SDGvfLqRBTmSE", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "h3tZSe7hZsbPCJHAP", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "BGoJ7Q6zTDrsCPYAL", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "SyxcuHv7HDuAd8PPs", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "L9DmmnwPcEZTQwXaY", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "QhaY5PqGijBrfCNCQ", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "JbXM5htNK75mD6aqb", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "ixsjCiytHSiXGhuaH", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "BcrJKuAyFEhMKDHMv", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "fhLyDHbQbpq4Mbded", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "pAtX4gDR7HNjCkYYe", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "Y98h39gyRFDE6vN8o", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "k77RAo7emxQyzQtot", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "ZTLogtxP5AwSBWrPk", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "iSxPoaW9BtdsvhWpQ", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "KcaL3zXnyhJqhxpJQ", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "stations", id: "Q8occTT7Sa973KiSm", fields: Object}
debugger.js:11FR: actual subscription completed: all_stations 68E6s544MCrw8LoEn
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "agreements", id: "nKR2PvkdaEwDBMyjf", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "agreements", id: "WuSnN9Cd23MPQRjRw", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "agreements", id: "FKmsctB92WmhDvaQq", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "agreements", id: "t2caxWC328ajnD3up", fields: Object}
debugger.js:11FR: re writing DDP for: Object {msg: "added", collection: "agreements", id: "2oWa7SuM4K3tm5Nzf", fields: Object}
debugger.js:11FR: actual subscription completed: all_contracts JoMerM6HuQH5A8bZq
debugger.js:11FR: fast rendering completed!

Do you have any idea what this could be, or is there any information I could provide you with to help figure this out? Thank you for the awesome products and support as usual Arunoda.

jadsonlourenco commented 9 years ago

I get this too, so I disabled Fast-Render and solve the delay.

arunoda commented 9 years ago

Did a fix related to this. Try updating to the latest version.

yched commented 8 years ago

I'm seeing this as well, it seems.

My app takes > 1 min to build with fast-render enabled, a few seconds without.

yched commented 8 years ago

Nevermind. I'm having a hard time figuring out what triggers those huge build times, but I'm seeing them without fast-render as well. Back to investigating...

yched commented 8 years ago

Looks like a meteor reset helped, FWIW.