perf(sync): Avoid ActionDisposableWrapper allocation by storing List<object> in DiContainerDisposer

Open Beginner friendly
#175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
backend

Research direction

Read ManualDi.Sync/ManualDi.Sync/Container/DiContainerDisposer.cs, especially QueueDispose(Action) around line 31, then compare the disposal logic with the matching implementation in ManualDi.Async. Change the sync disposer to store List<object> and handle IDisposable and Action during Dispose(). Done when wrapper allocations are removed and disposal still handles both item types.

Written by the indexing model from the issue text.

Description

enhancement
Summary

In ManualDi.Sync/ManualDi.Sync/Container/DiContainerDisposer.cs (line 31), QueueDispose(Action) wraps every action in new ActionDisposableWrapper(action).

Suggested Fix

Store List<object> (matching ManualDi.Async) and pattern-match IDisposable / Action during Dispose(), eliminating wrapper allocations.

Dominant language
C#
Stars
71
Forks
3
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from PereViader/ManualDi

All issues in PereViader/ManualDi

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.