-
Notifications
You must be signed in to change notification settings - Fork 1.2k
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build times (initial and subsequent) 2x-4x slower after 0.1.5 upgrade #2856
Comments
Can you share:
|
Or even better make a OSS repo that demonstrates this |
I'll see if I can create an open source project based on the one I'm referencing later today, but for now here's the info requested: app/: 356 files, 1.5MB total I can't think of anything else that might be related, but maybe something will come up if I can recreate it in an OSS project as @stefanpenner suggested. package.json "devDependencies": {
"broccoli-asset-rev": "^2.0.0",
"ember-autoresize": "^0.2.5",
"ember-cli": "^0.1.5",
"ember-cli-async-button": "^0.3.0",
"ember-cli-dependency-checker": "0.0.7",
"ember-cli-esnext": "0.1.1",
"ember-cli-google-analytics": "~1.1.0",
"ember-cli-htmlbars": "^0.6.0",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-less": "^1.0.4",
"ember-cli-moment": "0.0.1",
"ember-cli-qunit": "0.1.2",
"ember-cli-simple-auth": "^0.6.7",
"ember-cli-simple-auth-oauth2": "^0.6.7",
"ember-data": "^1.0.0-beta.11",
"ember-data-route": "0.0.3",
"ember-export-application-global": "^1.0.0",
"ember-pikaday": "^0.1.0",
"ember-validations": "^2.0.0-alpha.1",
"express": "^4.8.5",
"glob": "^4.0.5"
},
"dependencies": {
"ember-responsive": "^1.0.0",
"ember-velocity-mixin": "^0.2.0"
} bower.json {
"name": "myapp",
"dependencies": {
"handlebars": "2.0.0",
"jquery": "^1.11.1",
"ember": "~1.9.0",
"ember-data": "1.0.0-beta.11",
"ember-resolver": "~0.1.11",
"loader.js": "stefanpenner/loader.js#1.0.1",
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
"bootstrap": "~3.2.0",
"video.js": "~4.8.5",
"ember-simple-auth": "0.6.7",
"ember-qunit": "0.1.8",
"ember-qunit-notifications": "0.0.4",
"qunit": "~1.15.0",
"exifreader": "*",
"pikaday": "~1.2.0",
"momentjs": "~2.8.3",
"emojione": "~1.2.4",
"dom-ruler": "0.1.3",
"jQuery-linkify": "~1.1.7",
"FitText.js": "~1.2.0",
"hammerjs": "~2.0.4",
"hint.css": "~1.3.3",
"jquery.inputmask": "~3.1.47",
"masonry": "~3.2.1",
"imagesloaded": "~3.1.8",
"css-element-queries": "~0.0.2"
},
"resolutions": {
"handlebars": "2.0.0"
}
} Brocfile.js /* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
lessOptions: {
paths: [
'bower_components/bootstrap/less',
'bower_components/video.js/dist/video-js'
]
},
fingerprint: {
exclude: ['images/avatars', '/images/logo-for-stripe.jpg'],
}
});
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('bower_components/bootstrap/dist/js/bootstrap.js');
app.import('bower_components/video.js/dist/video-js/video.js');
app.import('bower_components/exifreader/js/ExifReader.js');
app.import('bower_components/emojione/lib/js/emojione.js');
app.import('bower_components/jQuery-linkify/src/linkified.js');
app.import('bower_components/FitText.js/jquery.fittext.js');
app.import('bower_components/hammerjs/hammer.js');
app.import('bower_components/jquery.inputmask/dist/jquery.inputmask.bundle.js');
app.import('bower_components/masonry/dist/masonry.pkgd.js');
app.import('bower_components/imagesloaded/imagesloaded.js');
app.import('bower_components/css-element-queries/src/ResizeSensor.js');
app.import('bower_components/css-element-queries/src/ElementQueries.js');
app.import('bower_components/hint.css/hint.css');
module.exports = app.toTree(); |
Same thing happened to me, except I updated from 0.1.4. For some reason I thought maps would actually improve on built time. |
@beerlington - Can you disable sourcemaps (add |
I have submitted a few PR's to make the slow tree graph a bit more useful here. |
@rwjblue disabling source maps doesn't seem to have any effect on the build time assuming I'm doing it right: var app = new EmberApp({
lessOptions: {
paths: [
'bower_components/bootstrap/less',
'bower_components/video.js/dist/video-js'
]
},
fingerprint: {
exclude: ['images/avatars', '/images/logo-for-stripe.jpg'],
},
sourcemaps: { enabled: false }
}); If I can find some time during lunch today, I'll post a project that demonstrates the issue. Thanks! |
@ef4 you may have some insight |
I created a test app that demonstrates what I'm seeing. All I did was pull over package.json, bower.json, and the Brocfile from my production app. Other than that it's just the default ember init with a new "hello" route. I also added a branch with v0.1.2 that I used to verify the issue is something between those versions. On my MB Air I'm seeing close to a 8x-10x slowdown with this project (both initial and rebuilds). |
@beerlington - Thanks for the repro app, I'll try to pull it down and take a look tomorrow. |
The same happened to me after upgrading from 0.1.4 to 0.1.5, rebuild times went from ~500ms to ~7s.. I was on a deadline so didn't had the time to report or check what was going on :/. |
I'm pretty sure I know what's the problem. Need to do some exploration to confirm though. |
Same here, with
and new line added to
same with
and
Almost 100% perf penalty |
Same here, the first build time is not much worse, but each subsequent build is 3x slower than with previous version (0.1.2 for us). |
same here :( |
@ef4 got some time? |
Ember-cli@0.1.2 ~36000ms |
@kuzirashi that is pretty useless feedback, please provide actionable information. I suspect your app is quite large, and removing We have plans to add more advanced caching to 6to5, as they hope to also improve its performance. |
@ef4 I noticed that it seems more files in bower_components/vendor are being processed then expected. |
@stefanpenner
It's even faster than in ember-cli@0.1.2(~30k ms). |
@kuzirashi whats your file count, and what is the time for incremental? |
Application directory:
I don't understand what time for incremental means. |
@kuzirashi incremental is when the app recompile partially after a file change (the subsequent builds after the first). ember-cli-sass depends on brocolli-sass so I doubt this would change anything (I do not see any difference here) |
Ok, my app compiles now faster than ever before so I'm happy. |
@kazirashi thanks, that looks reasonable. We did regress some performance when adding source-map support. We will hopefully sort that out soon. |
I have disabled source-map generation, but it does have any large impact performance, it is only shaving like 100ms over 1600ms during sequential builds (aka the major issue does not seems to be with the new source map default). A sequential build would take 500-600ms before with ember-cli 1.2. |
Instead of posting lots amount of code in this comment thread, please create a demo app demonstrating your stuff. As it is merely noisy and distracting from conversation. |
@msalahz @stefanpenner I have some good news. I am now seeing initial builds around 15 seconds and rebuild via While 10 seconds is still fairly long, it's something I can work with for now. I'm excited to hear about other performance improvements currently in the pipeline. Here are my latest build stats for a nearly empty app with a handful of vendor files:
|
Hello @abobwhite , I'm glad to be able to help. I would like to also point you out to webstorm section in ember website in case you didn't notice it. I also added other paths to my windows defender exclude list as shown below Here is my initial build with ember serve
and incremental build
@stefanpenner, @raytiley , I look forward to enhance my build time and I would love to have suggestions if there are any ? |
@msalahz I am unsure if their is something you can do today, other then attempting to boot stuff that is on-going (or hopefully soon to be on-going) right now.
@rwjblue do you have more to share? |
Thank you @stefanpenner, I will update to 0.1.13 and post the result here and I hope I can provide good news. |
Please keep this on topic. The last to comments are really not. |
I moved my instillation problem details to issue#3266 |
Hello @stefanpenner , @abobwhite , Today I managed to get ember-cli v0.1.15 installed and after updating my project I notice better build times (especially in incremental build) comparing to my previous build times and as following is my current build time : Here is my initial build with ember serve (previous build time was 6149ms)
and incremental build
Thank you and look forward to more enhancements in future releases. |
@msalahz Thanks. I've upgraded as well but I'm not seeing much of a difference at all in builds times. |
Yes @abobwhite , I also didn't have much of a difference in builds times on my office laptop(Note: The build times i shared was from my personal laptop), and this was very weird because i tried with the same project and the exact same code, and I also have the same development environment and the only defiance was that my personal laptop processor is Core i7 and my office laptop is Core i5. |
Hey Guys, I upgraded to ember-cli v0.2.0-beta.1 and my build times are very close to v0.1.15 with around 200 ms faster build times. |
Im currently investigating this, I have found several things. The most prominent is I'll keep you all posted as I have time and make progress. |
Thank you @stefanpenner , Yesterday I found out an issue on my project structure which I think it was the main reason behind my bad build times. I found the issue when I needed a jQuery plugin which doesn't have bower package or wrapped in an ember-cli addon so as usual I downloading the repo from Github and add it in vendor folder and after that I found my incremental build time increasing to around 17 seconds so I did the following : and now my build times are as following :
and incremental build (previous build time was 4349ms)
@abobwhite , I hope this help you. |
Hi, I can confirm too that my build time is eaten at 90% by the "Concat: Vendor". Interestingly, I also have a third-party dependency that is not available through Bower (and copied directly into the vendor directory). Furthermore, there must be a memory leak somewhere, because the longer I use it, the longer build times take (taking 1s for the first few incremental build - which is already very long compared to what I have before -), to up to 10s for the same project after a few dozen of minutes of use. If I remove my vendor dependency, build times are basically divided by 5 or 6. |
@bakura10 ya, I isolated a big issue related to this late last week. Hoping to fix early this week. |
Great news Windows users : The Microsoft DX Open Source team built a small tool that makes the configuration of Windows for Ember Cli projects a lot easier. |
Did my own tests for optimizing build times, that I want to share here... My setup: I played around, disabling this and that, and my findings are:
|
There is an invalidation during the Concat phase that causes stuff like less to rerun. I've been swamped but I hope to kill that invalidation soon. |
I tried to create a simple machine in this repository. It is using ember 0.2.0 because when I tried to use the lastest version, the process was killed (I don't know why). But the build times are 2.5s more slowers than when running on host machine. |
I just wanted to add on—I work at Intercom and we have a rather large Ember app. We're still stuck on 0.1.2 because of this issue. Our builds are already incredibly slow. Initial builds take ~40s and rebuilds take ~4s. That's with Babel removed. Every time a new version comes out we try it, but build times went off a cliff after 0.1.2, so we can't upgrade. Filesapp/: 1,860 files, 8.5MB total Initial build
Rebuild
|
I believe the performance is on the way to being able to its original speediness. #4460 (comment) outlines some recent improvements that will come out with the next release. If someone can provide
Next release of ember-cli should feel a lot better. read this for more context Although not where I want it yet, we are getting much closer. Expect these numbers to continue to improve over the next little bit. incremental build post those changes on @beerlington's example app.
|
@wayne-o your app doesn't appear public anymore, i would love to take the example for a spin and see what other scenarios I need to append to my performance attack plan. Let me know if that is still an option. |
Please note: some common compilers, like ember-cli-sass, less and likely others haven't yet been fixed. I'll slowly attempting to improve them over the next little bit. |
v1.13.8 now includes the fixes that bring @beerlington's example app back up to reasonable speed. There is more performance work outstanding, but the issue the original reporter described here should be addressed. some more focused perf related tracking issues i have opened: |
I upgraded from 0.1.2 to 0.1.5 and am seeing a 2x initial build time slowdown and a 4x subsequent rebuild time slowdown. The initial build time is tolerable because it only happens once, but having to wait > 4x longer when saving changes is a bit tedious during development. I initially upgraded on a MacBook Air and thought it was a fluke, but I've since done is on a fairly beefy iMac and am seeing the same results.
I created a gist showing a comparison of 0.1.2 vs 0.1.5 build times, but here's a short summary of what I'm seeing:
0.1.2 rebuild
0.1.5 rebuild
I searched through the open and closed issues from the last month or so and don't see anything similar to what I'm seeing. I'm also using Ember 1.9 (not 1.8.1 which is what
ember init
suggests I use), so perhaps that version is not yet supported?The text was updated successfully, but these errors were encountered: