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

Serving with AOT takes 10+ minutes #4020

Closed
masaanli opened this issue Jan 15, 2017 · 9 comments
Closed

Serving with AOT takes 10+ minutes #4020

masaanli opened this issue Jan 15, 2017 · 9 comments
Assignees
Labels
needs: investigation Requires some digging to determine if action is needed

Comments

@masaanli
Copy link

Please provide us with the following information:

Call I did:

node --max_old_space_size=8192 ./node_modules/.bin/ng serve --env=prod --aot=true

in v24 of the Cli it was just taking 50 seconds?

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
MacOS Siera

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
25.5 / 6.9.1

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

@clydin
Copy link
Member

clydin commented Jan 15, 2017

Can you provide console output of beta.24 vs beta.25 to get a better understanding of what's happening?

Also, a production AOT build is never going to be "fast". It's meant to optimize the output as much as possible. So except for a test scenario, it's not going to provide a very productive development experience in combination with serve.

@masaanli
Copy link
Author

masaanli commented Jan 15, 2017

@clydin the output is nothing more then 33 chunks being generated?

Yeah I know what you are saying, but sometimes you wanna test AOT on development environment too.

1 minute waiting was ok, but now it sometimes is taking 18 minutes max!

@filipesilva
Copy link
Contributor

@hansl any clue on why this changed so drastically?

@filipesilva filipesilva added the needs: investigation Requires some digging to determine if action is needed label Jan 15, 2017
@CanKattwinkel
Copy link

I just updated my project from beta.24 to 25.5. There was no performance losses for me when running
node --max_old_space_size=8192 ./node_modules/.bin/ng serve --env=prod --aot=true

@eight-molecules
Copy link
Contributor

No performance loss on MacOS for me, in fact things are working a little better than before.

You re-initialized the project after upgrading, correct?

@hansl
Copy link
Contributor

hansl commented Jan 17, 2017

I haven't seen any loss in performance for AOT, but it might be depending on the app itself.

@masaanli Could you provide an example application that we could test on? I'm really curious about such a performance hit and we definitely want to investigate.

Thanks!

@masaanli
Copy link
Author

@hansl it;s a application with 100+ pages and there is a lot of stuff. So I don't know how to reproduce it in a plunker I think a Plunker with SystemJS loading time is already 5 minutes hehe.

Teamviewer is possible?

hansl added a commit to hansl/angular-cli that referenced this issue Jan 20, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 20, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 20, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 20, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 20, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit to hansl/angular-cli that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
hansl added a commit that referenced this issue Jan 22, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: #1980, #4020, #3315
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
Keep the TypeScript SourceFile around so we don't regenerate all of them
when we rebuild the Program. The rebuild time is now 40-50% faster for
hello world. This means all the files which haven't changed are not
reparsed.

Mentions: angular#1980, angular#4020, angular#3315
@filipesilva
Copy link
Contributor

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: investigation Requires some digging to determine if action is needed
Projects
None yet
Development

No branches or pull requests

6 participants