Skip to content
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

ng build --profile generates empty speed-measure-plugin.json #12763

Closed
Adam-Michalski opened this issue Oct 26, 2018 · 7 comments · Fixed by #13945
Closed

ng build --profile generates empty speed-measure-plugin.json #12763

Adam-Michalski opened this issue Oct 26, 2018 · 7 comments · Fixed by #13945
Assignees
Labels
Milestone

Comments

@Adam-Michalski
Copy link

ng build --profile generates empty speed-measure-plugin.json

- [x] bug report -> please search issues before submitting

Command (mark with an x)

- [x] build

Versions

ng --version

Angular CLI: 7.0.3
Node: 11.0.0
OS: win32 x64
Angular: 7.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.10.3
@angular-devkit/build-angular     0.10.3
@angular-devkit/build-optimizer   0.10.3
@angular-devkit/build-webpack     0.10.3
@angular-devkit/core              7.0.3
@angular-devkit/schematics        7.0.3
@angular/cli                      7.0.3
@ngtools/webpack                  7.0.3
@schematics/angular               7.0.3
@schematics/update                0.10.3
rxjs                              6.3.3
typescript                        3.1.3
webpack                           4.19.1

Repro steps

Create new project and run ng build --profile

  1. ng new tester-measure
  2. cd tester-measure
  3. ng build --profile

failure

Generated empty speed-measure-plugin.json

Desired functionality

Not empty speed-measure-plugin.json

additional

chrome-profiler-events.json way to big to open in chrome. (Chrome crashes)

@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity3: broken area: @angular-devkit/build-angular labels Oct 26, 2018
@ngbot ngbot bot added this to the needsTriage milestone Oct 26, 2018
@Lakston
Copy link
Contributor

Lakston commented Oct 30, 2018

I can confirm that the speed measure file is empty on a fresh project in 7.0.3 too.

@filipesilva
Copy link
Contributor

Yeah the speed-measure-plugin seems broken... I'm not sure why, probably incompatible with the webpack version we're using atm.

Big chrome-profiler-events.json are hard to open in chrome sometimes. I don't have a good answer to that. In the past when I had trouble with those I had to manually profile only on rebuilds or something. Using https://github.com/GoogleChromeLabs/ndb might also help but not sure.

@Lakston
Copy link
Contributor

Lakston commented Nov 9, 2018

I took a look at the files quickly and the implementation looks ok so yes it might be a problem with the webpack version, I'll try to test that this week-end if I can find some time to do it!

@szymonbultrowicz
Copy link

Hi, any progress on that issue? It still happens in 7.1.0. Thanks.

@guillaumebouhier
Copy link

Issue is still reproducible on my side. Is there any workaround ?

alan-agius4 pushed a commit to alan-agius4/speed-measure-webpack-plugin that referenced this issue Mar 14, 2019
In certain cases the stats are not written, this seems to be because the process is being terminated before it finish to write. The reason being is using a sync version of tap.

To get around this, the sync method of fs should be used to allow the creation of files.

Related to: angular/angular-cli#12763
@alan-agius4
Copy link
Collaborator

This seems to be a bug in speed-measure-webpack-plugin. I have created a PR to address this issue stephencookdev/speed-measure-webpack-plugin#76

@alan-agius4 alan-agius4 self-assigned this Mar 14, 2019
alexeagle pushed a commit that referenced this issue Mar 19, 2019
…in to 1.3.1

This fixes the issue of it generating an empty speed-measure-plugin.json.

Fixes #12763
alexeagle pushed a commit that referenced this issue Mar 19, 2019
…in to 1.3.1

This fixes the issue of it generating an empty `speed-measure-plugin.json`.

Fixes #12763
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants