0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-13 22:11:20 -05:00
astro/.changeset/ten-emus-heal.md
chaegumi 3ac2263ff6
add support parallel builds (#11984)
* 支持并发生成

* feat: Add support parallel builds

* feat: read concurrency config

* changeset

* fix: Explicit undefined is unnecessary on an optional parameter

* pnpm-lock.yaml rebuild

* fix: add innerPrevTimeEnd

* fix: modification time calculation

* update pnpm-lock.yaml

* Rewrite with p-limit

* update

* clean

* Update changeset

* typo [skip ci]

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/astro/src/core/config/schema.ts

* formatting

* merge main and update the lock file

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-10-09 10:51:03 +01:00

1 KiB

astro
minor

Adds a new build.concurreny configuration option to specify the number of pages to build in parallel

In most cases, you should not change the default value of 1.

Use this option only when other attempts to reduce the overall rendering time (e.g. batch or cache long running tasks like fetch calls or data access) are not possible or are insufficient.

Use this option only if the refactors are not possible. If the number is set too high, the page rendering may slow down due to insufficient memory resources and because JS is single-threaded.

Warning

This feature is stable and is not considered experimental. However, this feature is only intended to address difficult performance issues, and breaking changes may occur in a minor release to keep this option as performant as possible.

// astro.config.mjs
import { defineConfig } from 'astro';

export default defineConfig({
  build: {
    concurrency: 2,
  },
});