PowerShell / PowerShell/PSScriptAnalyzer
Rule to recommend against Lists when using += with Array objects
Offen
@bergmeister arbeitet bereits daran.
Seit 14.3.2018.
Area - Rules
in progress
Issue - New Rule
- Vorherrschende Sprache
- C#
- Sterne
- 2.2k
- Forks
- 415
- Ø Merge
- 13 Std. 1 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
As some of the below articles note, using += with an Array object can be very slow, as it copies the Array into a new Array in-memory. The recommendation is very often to use List objects instead of Arrays to avoid this problem.
Thoughts?
https://stackoverflow.com/questions/14620290/powershell-array-add-vs
https://powershell.org/2013/09/16/powershell-performance-the-operator-and-when-to-avoid-it/
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.