b3b00 / b3b00/csly

[PERF] use arraypool for visitor method params

Open
#612 0 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
C#
Stars
415
Forks
38
Avg merge
7d 20h
Merged PRs (30d)
1

Description

Instead of creating a new array per visited node, use .NET's built-in System.Buffers.ArrayPool.
At the start of the node visit, rent an array from the pool that matches parametersCount.
Copy the parameters into it.
Pass it to the visitor.
Immediately after the visitor returns, return the array to the pool.

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the visitor implementation for where method-parameter arrays are created and where parametersCount is available. Start by tracing the node-visit path, then verify that parameters are copied into a rented ArrayPool array, passed to the visitor, and returned immediately after the visitor returns.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
performance
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.