vtable caching
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- performance, tooling
Research direction
Start at src/Generator/Generators/CSharp/CSharpSources.cs around line 2425 and review how pure virtual wrapper calls calculate the slot pointer and create delegates. Determine the intended caching lifetime and whether the existing behavior should remain optional or become the default; done requires an agreed caching design and corresponding implementation.
Written by the indexing model from the issue text.
Description
When generating managed wrappers for pure virtual functions the generated code ALWAYS "calculated" the pointer for the slot and generates a delegate wrapper (using Marshal.GetDelegateForFunctionPointer) for every single call... (in CSharpSources.cs)
Unless I'm completely out of my depth, this is a rather expensive call that could/should be cached when the wrapper object is new'd up...
Is there a reason for this weird behavior?
Would a pull request adding a caching layer be welcomed?
If so, should the existing behavior be made optional? default?
I would appreciate any sort of feedback, esp. a one explaining to me if/how I'm not grasping the situation...
- Dominant language
- C#
- Stars
- 3.4k
- Forks
- 541
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mono/CppSharp
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
How to get started Open
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100