Skip to content

perf(coverage-v8): optimize V8 AST coverage conversion#1490

Merged
9aoy merged 12 commits into
mainfrom
9aoy/feat-coverage-v8-fast-ast-converter
Jul 2, 2026
Merged

perf(coverage-v8): optimize V8 AST coverage conversion#1490
9aoy merged 12 commits into
mainfrom
9aoy/feat-coverage-v8-fast-ast-converter

Conversation

@9aoy

@9aoy 9aoy commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR improves V8 coverage conversion performance for bundled Rstest workloads. It replaces the generic ast-v8-to-istanbul runtime path with a local converter tailored for Rstest, filters raw V8 entries before source lookup/conversion, and keeps sourcemap remapping behavior for bundled assets.

Benchmark command in /Users/bytedance/Desktop/projects/rsbuild:

pnpm test --coverage --coverage.provider=v8
Version Trace Wall span Phase sum Coverage phase Collect
baseline (ast-v8-to-istanbul) trace-2026-06-30T07-27-13-436 6.05s 60.11s 42.728s 2.713s
optimized AST converter trace-2026-06-30T07-31-08-298 3.83s 31.68s 14.845s 2.828s
raw entry filtering + workflow trace-2026-06-30T07-27-27-444 1.81s 10.28s 0.014s 3.135s

Compared with baseline, the final version reduces wall span by 70.1% (3.34x faster) and phase sum by 82.9% (5.85x faster).

Checklist

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

Comment thread packages/coverage-v8/src/v8AstConverter.ts Fixed
9aoy and others added 3 commits June 30, 2026 18:47
… length'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…onverter' into 9aoy/feat-coverage-v8-fast-ast-converter
@9aoy

9aoy commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 706dc27577

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coverage-v8/src/v8AstConverter.ts
Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
@9aoy

9aoy commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dcf7b5ba11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
Comment thread packages/coverage-v8/src/v8AstConverter.ts
Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
@9aoy

9aoy commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f06ca57531

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
Comment thread packages/coverage-v8/src/provider.ts
@9aoy

9aoy commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20d8c112af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coverage-v8/src/provider.ts Outdated
Comment thread packages/coverage-v8/src/v8AstConverter.ts

9aoy commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@9aoy

9aoy commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c61011fa1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
Comment thread packages/coverage-v8/src/v8AstConverter.ts Outdated
@9aoy 9aoy changed the title feat(coverage-v8): optimize V8 AST coverage conversion perf(coverage-v8): optimize V8 AST coverage conversion Jul 2, 2026

9aoy commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@9aoy 9aoy requested a review from fi3ework July 2, 2026 08:30
@9aoy

9aoy commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: ea35d6dcb7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@9aoy 9aoy merged commit 9a17899 into main Jul 2, 2026
12 checks passed
@9aoy 9aoy deleted the 9aoy/feat-coverage-v8-fast-ast-converter branch July 2, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant