Skip to content

Conversation

@SyMind
Copy link
Collaborator

@SyMind SyMind commented Nov 6, 2025

This PR adds a new benchmark to measure the performance of CachedSource when mapping repetitive React components. The changes introduce a dedicated benchmark function that wraps the existing source in a CachedSource to test caching behavior.

Copilot AI review requested due to automatic review settings November 6, 2025 08:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new benchmark to measure the performance of CachedSource when mapping repetitive React components. The changes introduce a dedicated benchmark function that wraps the existing source in a CachedSource to test caching behavior.

Key changes:

  • Added CachedSource to imports in the benchmark module
  • Created benchmark_repetitive_react_components_map_cached_source function
  • Registered the new benchmark in the benchmark suite

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
benches/benchmark_repetitive_react_components.rs Added import for CachedSource and implemented new benchmark function for testing cached source mapping
benches/bench.rs Registered the new benchmark function in the benchmark suite

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 6, 2025

CodSpeed Performance Report

Merging #201 will not alter performance

Comparing bench-with-cached-source (6483145) with main (0d3ca2b)

Summary

✅ 10 untouched
🆕 1 new
⏩ 6 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 complex_replace_source_map_cached_source_stream_chunks N/A 54.7 ms N/A

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@SyMind SyMind force-pushed the bench-with-cached-source branch 4 times, most recently from d5e2d1b to 036ccdb Compare November 6, 2025 08:38
@SyMind SyMind changed the title chore: bench with cached source chore: bench cached source stream_chunks Nov 6, 2025
@SyMind SyMind force-pushed the bench-with-cached-source branch from 036ccdb to 6483145 Compare November 6, 2025 08:46
@SyMind SyMind merged commit 7b7842a into main Nov 6, 2025
10 checks passed
@SyMind SyMind deleted the bench-with-cached-source branch November 6, 2025 08:50
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.

2 participants