Memory/performance: GEDSplitter.GetRest
- Dominant language
- C#
- Stars
- 8
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Current logic tracks the "remainder" (as from LevelTagAndRemain) as a char[]. This requires allocating a char[] to hold the remainder, then store it in the LineData context [see LineData.Remain1].
Many consumers want the remainder as a string. So two allocations take place: the char[], and a subsequent new string() [see LineData.Remain].
Name parsing certainly takes advantage of LineData.Remain1.
GedParser.Make() is one place where the gs.Remain() call should probably be replaced with gs.RemainAsString()?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading GEDSplitter.GetRest and the LineData.Remain1 and LineData.Remain members, then trace the gs.Remain() call in GedParser.Make(). Determine which consumers require a char[] and which only need a string. Done means string consumers avoid the intermediate char[] allocation while name parsing continues to work correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100