⚡ Bolt: Reduce allocations by pre-sizing List in CsvLineSplitter
💡 What: Update CsvLineSplitter to accept an initial capacity for the List<T> used to store split values, and update CsvReader to pass the header count (if available) as the capacity.
🎯 Why: CsvLineSplitter creates a new List<T> for every line. The default capacity is small (4), causing multiple resizes and array allocations for every line if the CSV has many columns (e.g., 50 columns -> 4 resizes).
📊 Impact: Reduces memory allocations and CPU overhead associated with List<T> resizing for every row in the CSV file.
🔬 Measurement: Verified by running dotnet test. Performance improvement is expected in high-throughput parsing scenarios with many columns.
PR created automatically by Jules for task 466527172311085013 started by @stevehansen
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.
When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.
I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!
For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!
For security, I will only act on instructions from the user who triggered this task.
New to Jules? Learn more at jules.google/docs.