{"id":28972553,"url":"https://github.com/ember-cli/stress-app","last_synced_at":"2025-06-24T11:06:56.242Z","repository":{"id":36858001,"uuid":"41164959","full_name":"ember-cli/stress-app","owner":"ember-cli","description":null,"archived":false,"fork":false,"pushed_at":"2020-02-10T10:25:31.000Z","size":10510,"stargazers_count":9,"open_issues_count":5,"forks_count":5,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-06-14T04:38:53.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ember-cli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-21T16:04:16.000Z","updated_at":"2019-12-21T19:12:03.000Z","dependencies_parsed_at":"2022-09-25T04:20:17.948Z","dependency_job_id":null,"html_url":"https://github.com/ember-cli/stress-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ember-cli/stress-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fstress-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fstress-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fstress-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fstress-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ember-cli","download_url":"https://codeload.github.com/ember-cli/stress-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fstress-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260577243,"owners_count":23030690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-24T11:06:55.312Z","updated_at":"2025-06-24T11:06:56.215Z","avatar_url":"https://github.com/ember-cli.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stress-app\n\nThis app aims to be a stress test for ember-cli.\nWe will contiue to add scenarios that make it slow, then make it fast again\n\n\n[issues](https://github.com/ember-cli/stress-app/issues/) are going to track known issues with this app\n[ember-cli/issues](https://github.com/ember-cli/ember-cli/issues?q=is%3Aopen+is%3Aissue+label%3Aperformance) is meant for perf issues that in ember-cli but are likely described by a scenario here.\n\n## Latest\n```\n➜  slow-ember-cli-project git:(master) ✗ cloc --skip-uniqueness {app,tests}\n    2335 text files.\n    2335 unique files.\n       6 files ignored.\n\nhttp://cloc.sourceforge.net v 1.64  T=5.44 s (429.0 files/s, 20048.1 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nHandlebars                     907           6055           1813          44432\nJavascript                    1423          13300           2608          40694\nSASS                             2              9              3             96\nHTML                             2             10              0             48\n-------------------------------------------------------------------------------\nSUM:                          2334          19374           4424          85270\n-------------------------------------------------------------------------------\n```\n\n*note this is without bower_components, which are also consulted and introduce another 86,000 files some of which are consulted as part of the build*\n\n\n\nbefore\n```\n➜  slow-ember-cli-project git:(master) ✗ file changed app.js\n\nBuild successful - 1871ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nSassCompiler                                  | 969ms\nTreeMerger (appTestTrees)                     | 170ms\nTreeMerger (app)                              | 139ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nSassCompiler (1)                              | 969ms\nTreeMerger (appTestTrees) (1)                 | 170ms\nTreeMerger (app) (1)                          | 139ms\nBabel (17)                                    | 116ms (6 ms)\n```\n\nafter\n```\n➜  slow-ember-cli-project git:(master) ✗ file changed app.js\n\nBuild successful - 1464ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nSassCompiler                                  | 940ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nSassCompiler (1)                              | 940ms\nBabel (17)                                    | 95ms (5 ms)\nFunnel (60)                                   | 88ms (1 ms)\n```\n\ntop offender: SassCompiler cacheKey construction. Basically it currently scans 87,823s files to detect a change, because\nbower_components is mega massive. Basically, I suspect I have reduced the brought force time to potentially its lower limit (will do some more investigation to confirm this). \n\nI have begun work on massaging broccoli to all us to seed \"changes\" via a single watchman query, I wouldn't count on it landing too quickly, but it is something I hope to make progress on soon. This has the potentially of reducing (even for 100,000+ files) the cache derivation time by atleast an order of magnitude or more.\n\nThe above abstraction has the potential to also unlock another round of initial build time improvements.\n\n*OFfending logging illustrating the problem.*\n\n```\n '/Users/stefanpenner/tmp/slow-ember-cli-project/tmp/simple_concat-input_base_path-hmvo2HsQ.tmp/0' ] } +55ms\n  broccoli-caching-writer:SimpleConcat \u003e [Concat: App] derive cacheKey in 56ms +1ms\n  broccoli-caching-writer:SassCompiler walking undefined +35s\n  broccoli-caching-writer:SassCompiler walking undefined +1s\n  broccoli-caching-writer:SassCompiler { stats: 0, files: 87823, inputPaths: [ '/Users/stefanpenner/tmp/slow-ember-cli-project/tmp/sass_compiler-input_base_path-PJtisOR9.tmp/0', '/Users/stefanpenner/tmp/slow-ember-cli-project/tmp/sass_compiler-input_base_path-PJtisOR9.tmp/1' ] } +3ms\n  broccoli-caching-writer:SassCompiler derive cacheKey in 1013ms +1ms\n```\n\n## Latest(older) state (with 86,000 files in bower_components)\n\n\n```\n➜  slow-ember-cli-project git:(master) ✗ cloc --skip-uniqueness {app,tests}\n    2335 text files.\n    2335 unique files.\n       6 files ignored.\n\nhttp://cloc.sourceforge.net v 1.64  T=5.44 s (429.0 files/s, 20048.1 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nHandlebars                     907           6055           1813          44432\nJavascript                    1423          13300           2608          40694\nSASS                             2              9              3             96\nHTML                             2             10              0             48\n-------------------------------------------------------------------------------\nSUM:                          2334          19374           4424          85270\n-------------------------------------------------------------------------------\n```\n\n*note this is without bower_components, which are also consulted and introduce another 86,000 files some of which are consulted as part of the build*\n\n### initial warm build\n\n```\nBuild successful - 8412ms.\n\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nBabel (17)                                    | 3378ms (198 ms)\nSassCompiler (1)                              | 1177ms\nTemplateCompiler (3)                          | 924ms (308 ms)\nJSHint app- QUnit (1)                         | 588ms\n\n```\n\n### rebuild:\n\n```\nBuild successful - 1997ms.\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nSassCompiler (1)                              | 1013ms * biggest offender, when we started this was 20,000ms+\n** even though good progress as been made, I plan that should likely dramatically reduce this\n** note, this is a pretty extreme scenario. A bower_components of 86,000 files is a pretty hefty outlier\n\nTreeMerger (appTestTrees) (1)                 | 169ms * current focus (causes lots of wasteful writes/deletes)\nTreeMerger (app) (1)                          | 150ms * current focus (causes lots of wasteful writes/deletes)\nBabel (17)                                    | 108ms (6 ms)\nFunnel (60)                                   | 101ms (1 ms)\n```\n\n## Updates:\n\n\n* many app.imports (lets get the number)\n* very large bower_components dir (87472k+ files – we hit a pathalogical scenario here that is now largely fixed)\n* medium -\u003e large sized app\n\n```\ncloc --skip-uniqueness {app,tests}\n    2136 text files.\n    2136 unique files.\n       8 files ignored.\n\nhttp://cloc.sourceforge.net v 1.64  T=4.05 s (526.9 files/s, 14955.1 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nJavascript                    1308          11115           1976          33679\nHandlebars                     823           3209            401          10047\nSASS                             2              9              3             96\nHTML                             2             10              0             48\n-------------------------------------------------------------------------------\nSUM:                          2135          14343           2380          43870\n-------------------------------------------------------------------------------\n```\n\n## Progress so far\n\nprogress so far:\n\n* 1.13.0\n  *  [initial] Build successful - 46753ms.\n  *  [rebuild] Build successful - 18175ms.\n\n* 1.13.8\n  *  [initial] Build successful - 37098ms.\n  *  [rebuild] Build successful - 7171ms.\n\nThis was largely the result of broccoli-caching-writer + source-map concat not being aware of each other.\nBCW by default will diff all inputTrees for change, then only run if the result is different then before. As it turns out, with very large bower_component trees, most of the time is spent walking and stating the disk.\n\nIn most cases, source map concat, is provided a list of files it explicitly cares about. So passing this exact information through to BCW resulted in a pretty hefty speedup. [related ember-cli issue + discussion](https://github.com/ember-cli/ember-cli/issues/4460)\n\n* master (August 23, 2015)\n  *  [initial] Build successful - 36687ms.\n  *  [rebuild] Build successful - 5384ms.\n\nAs it turns out, app.import has become more popular the expected. Rather then being used 5 or 6 times in an app. It is not uncommon to (large via addons) have hundreds of them. Originally, app.import was written in a way to work-around several issues including node-watcher being poor. Now with watchman, we can reasonably watch the whole tree. So we could literally delete the old code, remove hundreds of extra broccoli steps. And squeeze out some more performance.\n\n* master (August 24, 2015)\n  *   [initial warm] Build successful - 15090ms.\n  *   [rebuild] Build successful - 6830ms.\n\nSome filters, like babel/jshint/htmlbars are slow. If we can re-use the results from the last build, initial boot should improve. Turns out it helps quite a bit. 36,000ms -\u003e 15,000ms on warm boots. On some apps, this can save minutes.\n[on ember itself](https://github.com/emberjs/ember.js/pull/12190) it went from 50,000ms -\u003e 15,000ms.\n\n[related issue](https://github.com/ember-cli/ember-cli/issues/4645)\n\nturns out warm boots are still abit slow\n* https://github.com/stefanpenner/broccoli-persistent-filter/pull/25 (improves babel warm boot 2108ms -\u003e 1400ms), more to come.\n\n### Up next;\n\n![times and plans](http://static.iamstef.net/Voila_Capture%202015-08-27_07-58-46_AM.png)\nwill be addressed by: https://github.com/ember-cli/ember-cli/pull/4764\n\n* [ES6: App Tree] [App JS Files (1)] are basically doing duplicate effort, babel step could already do. For those users who are using babel, we should defer this work to that transform intsead. Ideally skipping this intermediate step all- together. This will hopefully help incremental builds, but we will likely see some initial build improvements aswell. (@chadhietala is takinga  stab: https://github.com/ember-cli/ember-cli/pull/4764)\n\n\n* now that broccoli-plugin exists a stable outputDirectory is possible. This will allow us to re-write the common plugins to merely do delta updates on the output, rather then recreating the output. This has been part of the plan that prompted the broccoli-plugin api. We also need to finish the BCW conversion to BP, or BCW outputs wont benefit.\n\n\n* rather then reading the inputDir, we can defer to watchman (skipping input IO at all). Unfortunately we must wait until watchman adds symlink + watched symlink support. Or we can implement the resolving code on our side. They have plans to in afew weeks/month implement this, I suspect our timeline will align us with there progress.\n\n....\n\nThis current state of the stress-app is pretty good respresentation of the current state of medium -\u003e large sized apps. It doesn't yet represent some of the mega sized apps, but that is ok for now. Lets get these numbers down.\n\n* near term target (reasonable near term)\n  * [initial warm] Build successful - 10000ms. (this is for warm, cache primed builds and restarts)\n  * [rebuild] Build successful - 2500ms. (not perfect, but feels like a reasonable short term goal 50% of current)\n\n==== more indepth output\n\n```\nversion: 1.13.0--6d06abacc7\nDeprecation warning: sassOptions should be moved to your Brocfile\nLivereload server on http://localhost:35729\nServing on http://localhost:5511/\nBuild successful - 46753ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nBabel                                         | 8528ms\nJSHint app- QUnit                             | 6524ms\nBabel                                         | 6522ms\nES6: App Tree                                 | 4577ms\nSourcemapConcat                               | 2379ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nBabel (13)                                    | 16463ms (1266 ms)\nSourcemapConcat (8)                           | 11020ms (1377 ms)\nJSHint app- QUnit (1)                         | 6524ms\nES6: App Tree (1)                             | 4577ms\n\n➜  slow-ember-cli-project git:(master) ✗ touch app/app.js\n➜  slow-ember-cli-project git:(master) ✗ file changed app.js\n\nBuild successful - 18175ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nSourcemapConcat                               | 2596ms\nSourcemapConcat                               | 2281ms\nSourcemapConcat                               | 2268ms\nSourcemapConcat                               | 2183ms\nFunnel: App JS Files                          | 2028ms\nSourcemapConcat                               | 2016ms\nSassCompiler                                  | 1754ms\nES6: App Tree                                 | 1028ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nSourcemapConcat (8)                           | 11397ms (1424 ms)\nFunnel: App JS Files (1)                      | 2028ms\nSassCompiler (1)                              | 1754ms\nES6: App Tree (1)                             | 1028ms\n```\n---\n\n```\n➜  slow-ember-cli-project git:(master) ✗ version: 1.13.8--1121141036\nDeprecation warning: sassOptions should be moved to your Brocfile\nLivereload server on http://localhost:49152\nServing on http://localhost:5511/\nBuild successful - 37098ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nBabel                                         | 8500ms\nJSHint app- QUnit                             | 6754ms\nBabel                                         | 6546ms\nES6: App Tree                                 | 4058ms\nSassCompiler                                  | 3326ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nBabel (13)                                    | 16496ms (1268 ms)\nJSHint app- QUnit (1)                         | 6754ms\nES6: App Tree (1)                             | 4058ms\nSassCompiler (1)                              | 3326ms\n\n➜  slow-ember-cli-project git:(master) ✗ touch app/app.js\n➜  slow-ember-cli-project git:(master) ✗ file changed app.js\n\nBuild successful - 7171ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nSassCompiler                                  | 2796ms\nFunnel: App JS Files                          | 1278ms\nBroccoliMergeTrees                            | 812ms\nConcat: App                                   | 502ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nSassCompiler (1)                              | 2796ms\nFunnel: App JS Files (1)                      | 1278ms\nBroccoliMergeTrees (15)                       | 851ms (56 ms)\nConcat: App (1)                               | 502ms\nBabel (13)                                    | 366ms (28 ms)\n```\n\n----\n\n```\nember s --port 5511 \u0026\n➜  slow-ember-cli-project git:(master) ✗ version: 1.13.8-master-a6e9e4eeaf\nDeprecation warning: sassOptions should be moved to your Brocfile\nLivereload server on http://localhost:49152\nServing on http://localhost:5511/\n\nBuild successful - 36687ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nBabel                                         | 8431ms\nJSHint app- QUnit                             | 6835ms\nBabel                                         | 6486ms\nES6: App Tree                                 | 4061ms\nSassCompiler                                  | 3203ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nBabel (13)                                    | 16345ms (1257 ms)\nJSHint app- QUnit (1)                         | 6835ms\nES6: App Tree (1)                             | 4061ms\nSassCompiler (1)                              | 3203ms\n\n➜  slow-ember-cli-project git:(master) ✗ touch app/app.js\n➜  slow-ember-cli-project git:(master) ✗ file changed app.js\n\nBuild successful - 5384ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nSassCompiler                                  | 1415ms\nFunnel: App JS Files                          | 1208ms\nBroccoliMergeTrees                            | 810ms\nConcat: App                                   | 407ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nSassCompiler (1)                              | 1415ms\nFunnel: App JS Files (1)                      | 1208ms\nBroccoliMergeTrees (15)                       | 845ms (56 ms)\nConcat: App (1)                               | 407ms\nBabel (13)                                    | 350ms (26 ms)\n```\n\n```\nember s\nversion: 1.13.8-broccoli-viz-0ed4b89831\n\nBuild successful - 15263ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nES6: App Tree                                 | 4197ms\nSassCompiler                                  | 2214ms\nTemplateCompiler                              | 1674ms\nJSHint app- QUnit                             | 1083ms\nFunnel: App JS Files                          | 1054ms\nBabel                                         | 1049ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nES6: App Tree (1)                             | 4197ms\nSassCompiler (1)                              | 2214ms\nBabel (13)                                    | 2108ms (162 ms)\nTemplateCompiler (2)                          | 1707ms (853 ms)\nJSHint app- QUnit (1)                         | 1083ms\nFunnel: App JS Files (1)                      | 1054ms\n\n➜  slow-ember-cli-project git:(master) ✗ touch app/app.js\n➜  slow-ember-cli-project git:(master) ✗ file changed app.js\n\nBuild successful - 5876ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nFunnel: App JS Files                          | 1633ms\nSassCompiler                                  | 1572ms\nBroccoliMergeTrees                            | 944ms\nConcat: App                                   | 448ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nFunnel: App JS Files (1)                      | 1633ms\nSassCompiler (1)                              | 1572ms\nBroccoliMergeTrees (14)                       | 969ms (69 ms)\nConcat: App (1)                               | 448ms\nBabel (13)\n```\n\nWed 10:30am August 25\n\n```\nBuild successful - 14127ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nES6: App Tree                                 | 4296ms\nSassCompiler                                  | 2200ms\nTemplateCompiler                              | 1571ms\nFunnel: App JS Files                          | 934ms\nBabel                                         | 736ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nES6: App Tree (1)                             | 4296ms\nSassCompiler (1)                              | 2200ms\nTemplateCompiler (3)                          | 1653ms (551 ms)\nBabel (14)                                    | 1495ms (106 ms)\nFunnel: App JS Files (1)                      | 934ms\n```\n\n```\nBuild successful - 5876ms.\n\nSlowest Trees                                 | Total\n----------------------------------------------+---------------------\nFunnel: App JS Files                          | 1633ms\nSassCompiler                                  | 1572ms\nBroccoliMergeTrees                            | 944ms\nConcat: App                                   | 448ms\n\nSlowest Trees (cumulative)                    | Total (avg)\n----------------------------------------------+---------------------\nFunnel: App JS Files (1)                      | 1633ms\nSassCompiler (1)                              | 1572ms\nBroccoliMergeTrees (14)                       | 969ms (69 ms)\nConcat: App (1)                               | 448ms\nBabel (13)\n```\n\nThis improvements have been mostly targeted a bower_components \\w massive trees causing totally unexpected grief.\n\nUp next:\n\n* persistent filters to improve initial boot for \n  * jshint\n  * jscs\n  * babel\n* alternative approach for CSS plugins (explicitly configure all input trees)\n* batch mkdpr creation for broccoli-filter + broccoli-merge-trees -\u003e https://github.com/broccolijs/broccoli-filter/pull/33\n* persistentOutput refactors for broccoli-filter + broccoli-merge-trees\n* ???\n\n## Prerequisites\n\nYou will need the following things properly installed on your computer.\n\n* [Git](http://git-scm.com/)\n* [Node.js](http://nodejs.org/) (with NPM)\n* [Bower](http://bower.io/)\n* [Ember CLI](http://www.ember-cli.com/)\n* [PhantomJS](http://phantomjs.org/)\n\n## Installation\n\n* `git clone \u003crepository-url\u003e` this repository\n* change into the new directory\n* `npm install`\n* `bower install`\n\n## Running / Development\n\n* `ember server`\n* Visit your app at [http://localhost:4200](http://localhost:4200).\n\n### Code Generators\n\nMake use of the many generators for code, try `ember help generate` for more details\n\n### Running Tests\n\n* `ember test`\n* `ember test --server`\n\n### Building\n\n* `ember build` (development)\n* `ember build --environment production` (production)\n\n### Deploying\n\nSpecify what it takes to deploy your app.\n\n## Further Reading / Useful Links\n\n* [ember.js](http://emberjs.com/)\n* [ember-cli](http://www.ember-cli.com/)\n* Development Browser Extensions\n  * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)\n  * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fstress-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-cli%2Fstress-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fstress-app/lists"}