Skip to content

Commit e0212d2

Browse files
authored
Merge pull request #2820 from dawedawe/remove_asparallel_in_mergeMultipleFormatResults
remove AsParallel() when mapping over the results in mergeMultipleFormatResults()
2 parents 8e10a1b + 77daf50 commit e0212d2

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [6.0.0-alpha-010] - 2023-04-03
4+
5+
### Fixed
6+
* Fix a performance regression. [#2820](https://github.com/fsprojects/fantomas/pull/2820)
7+
38
## [6.0.0-alpha-009] - 2023-03-31
49

510
### Fixed

src/Fantomas.Core/MultipleDefineCombinations.fs

+6-8
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,12 @@ let splitWhenHash (defines: DefineCombination) (newline: string) (source: string
188188
let mergeMultipleFormatResults config (results: (DefineCombination * FormatResult) list) : FormatResult =
189189
let allInFragments: FormatResultForDefines list =
190190
results
191-
.AsParallel()
192-
.Select(fun (dc, result) ->
193-
let fragments = splitWhenHash dc config.EndOfLine.NewLineString result.Code
194-
195-
{ Result = result
196-
Defines = dc
197-
Fragments = fragments })
198-
|> Seq.toList
191+
|> List.map (fun (dc, result) ->
192+
let fragments = splitWhenHash dc config.EndOfLine.NewLineString result.Code
193+
194+
{ Result = result
195+
Defines = dc
196+
Fragments = fragments })
199197

200198
let allHaveSameFragmentCount =
201199
let allWithCount = List.map (fun { Fragments = f } -> f.Length) allInFragments

0 commit comments

Comments
 (0)