Add "Avoid function / scriptblock based recursion" section to `Performance Considerations` document
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- documentation
Research direction
Edit reference/docs-conceptual/dev-cross-plat/performance/script-authoring-considerations.md, linked from the reported Performance Considerations page. Start by reading the existing performance guidance and the referenced Stack Overflow answers, then add a section covering why function or scriptblock recursion should be avoided and the Stack or Queue approach. Done means the requested guidance is present in the document.
Written by the indexing model from the issue text.
Description
Type of issue
Missing information
Feedback
Knowing that PowerShell functions are quite expensive (see: https://stackoverflow.com/a/75722847/1701026) it is better to avoid recursion as per helpful StackOverflow answer from @santisq:
The recommended approach would be to traverse your nested objects using a
StackorQueue(or their generic counterpartsStack<T>andQueue<T>).
Page URL
Content source URL
Author
@sdwheeler
Document Id
9818d91b-8c5f-337a-f5e1-7a40abd5fd1a
- Dominant language
- PowerShell
- Stars
- 2.5k
- Forks
- 1.7k
- Avg merge
- 8h 45m
- Merged PRs (30d)
- 33
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 MicrosoftDocs/PowerShell-Docs
-
hold-for-pr hold-for-release issue-doc-idea
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MicrosoftDocs/PowerShell-Docs#13195 ·
-
hold-for-pr hold-for-release
Difficulty 1/5 Under an hour Newbie friendliness 88/100
MicrosoftDocs/PowerShell-Docs#12897 ·
-
issue-doc-idea needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
MicrosoftDocs/PowerShell-Docs#13289 ·
-
hold-for-pr hold-for-release
Difficulty 4/5 3-5 days Newbie friendliness 48/100
MicrosoftDocs/PowerShell-Docs#13172 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
MicrosoftDocs/PowerShell-Docs#12948 · 2 reactions ·
All issues in MicrosoftDocs/PowerShell-Docs
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·