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

Build times are misleading #6965

Closed
1 task done
stramel opened this issue May 2, 2023 · 0 comments · Fixed by #8122
Closed
1 task done

Build times are misleading #6965

stramel opened this issue May 2, 2023 · 0 comments · Fixed by #8122
Assignees
Labels
- P2: nice to have Not breaking anything but nice to have (priority)

Comments

@stramel
Copy link
Contributor

stramel commented May 2, 2023

What version of astro are you using?

2.2.3

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

When running my build the build times per page are misleading.

21.87  generating static routes 
24.36 ▶ src/pages/company/[companyName]/page.astro
30.32   ├─ /company/a/page/index.html (+5.96s)
30.49   ├─ /company/b/page/index.html (+6.13s)
30.65   ├─ /company/c/page/index.html (+6.29s)
30.79   ├─ /company/d/page/index.html (+6.43s)
# ...
102.4   └─ /company/zzzz/page/index.html (+78.06s)

This reads as if each page is taking an X seconds to generate but it seems as though it's just a running clock. I would imagine this should instead be:

21.87  generating static routes 
24.36 ▶ src/pages/company/[companyName]/page.astro (+5.8s)
30.32   ├─ /company/a/page/index.html (+160ms)
30.49   ├─ /company/b/page/index.html (+170ms)
30.65   ├─ /company/c/page/index.html (+160ms)
30.79   ├─ /company/d/page/index.html (+140ms)
# ...
102.4   └─ /company/zzzz/page/index.html (+110ms)

Following with the totals

102.5 Completed in 80.59s.
102.5 
104.1 @astrojs/sitemap: `sitemap-index.xml` is created.
104.1 
104.1 01:44:31 PM [build] 671 page(s) built in 101.54s
104.1 01:44:31 PM [build] Complete!

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-vrmtvm (NOTE: This runs very quickly compared to my application but still represents the issue)

Participation

  • I am willing to submit a pull request for this issue.
@bluwy bluwy added the - P2: nice to have Not breaking anything but nice to have (priority) label May 2, 2023
natemoo-re added a commit that referenced this issue Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants