Skip to content

process static assets in parallelΒ #3909

@tirojal

Description

@tirojal

Environment

nuxt 3.18.1 -> nitro 2.12.4

Reproduction

Describe the bug

During ivestigation why my nuxt project build takes about 7 min on nitro step i found that nitro resolves public-assets-data by iterating over nitro.options.output.publicDir files one by one
See:
#nitro-internal-virtual/public-assets-data (v2) (src/rollup/plugins/public-assets.ts)
and/or
#nitro/virtual/public-assets-data (v3) (src/build/virtual/public-assets.ts)

for nuxt project it processes every file in /.nuxt/dist/client/_nuxt and it takes about 0.3 seconds per file. In my project, I have about 650 files, so it takes ~3 minutes to finish.

So i made local patch to batch processing of files, see my comment in:
nuxt/nuxt#31836 (comment)

Additional context

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions