DapperLib / DapperLib/Dapper

[Optimization] Proposal: Span-based mapping for reduced allocations

Open
#2,166 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

Problem

Current object mapping in Dapper uses reflection which causes memory overhead for bulk operations.

Proposed Solution

Implement a Span<T>-based mapper as an alternative for scenarios like:

  • High-volume data processing
  • AOT compatibility

Benchmark Expectations

Expected 20-30% reduction in memory allocations (based on prototype).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current reflection-based object mapping path in Dapper and review the prototype referenced by the proposal, if available. Evaluate whether a Span-based alternative can support high-volume processing and AOT compatibility, then establish benchmarks that measure the proposed 20–30% allocation reduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
database, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.