Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

This PR improves startup performance by creating Zod schemas on demand.

When importing @rspack/core, it creates many Zod schemas for plugins and loaders. But if these plugins or loaders are not used, the overhead of these Zod calls is unnecessary.

See:

Screenshot 2025-06-13 at 22 22 51

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Jun 13, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit a8e15f1
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/684c35585230260008011741

@github-actions github-actions bot added release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack. labels Jun 13, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jun 13, 2025

CodSpeed Performance Report

Merging #10669 will not alter performance

Comparing lazy_init_zod_0613 (a8e15f1) with main (430b5ad)

Summary

✅ 12 untouched benchmarks

@chenjiahan chenjiahan requested a review from LingyuCoder June 14, 2025 02:14
@chenjiahan chenjiahan merged commit c927905 into main Jun 16, 2025
37 checks passed
@chenjiahan chenjiahan deleted the lazy_init_zod_0613 branch June 16, 2025 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants