Skip to content

Switched to rent an array in Giraffe handler and use PooledList in AsyncVal - #465

Open
xperiandri wants to merge 5 commits into
devfrom
PooledResizeArray_optimization
Open

Switched to rent an array in Giraffe handler and use PooledList in AsyncVal#465
xperiandri wants to merge 5 commits into
devfrom
PooledResizeArray_optimization

Conversation

@xperiandri

@xperiandrixperiandri commented Mar 23, 2024

Copy link
Copy Markdown
Collaborator

Before

MethodMeanErrorStdDevMedianMinMaxOp/sGen0Gen1Allocated
BenchmarkSimpleQueryUnparsed85.76 us1.232 us1.092 us85.72 us83.60 us87.16 us11,660.352.1973-18.76 KB
BenchmarkSimpleQueryParsed72.29 us1.858 us5.421 us70.58 us64.11 us85.09 us13,832.251.0986-9.32 KB
BenchmarkSimpleQueryPlanned33.19 us1.559 us4.474 us31.79 us27.82 us46.85 us30,131.190.8850-7.34 KB
BenchmarkFlatQueryUnparsed239.63 us4.740 us10.795 us241.52 us223.64 us270.59 us4,173.097.3242-62.97 KB
BenchmarkFlatQueryParsed207.96 us2.940 us2.455 us207.71 us202.99 us212.43 us4,808.635.61520.244147 KB
BenchmarkFlatQueryPlanned163.65 us3.044 us2.698 us163.58 us160.08 us168.58 us6,110.625.12700.244143.66 KB
BenchmarkNestedQueryUnparsed413.30 us8.226 us16.987 us409.96 us389.94 us460.48 us2,419.5720.50780.4883168.51 KB
BenchmarkNestedQueryParsed348.44 us3.702 us3.463 us348.09 us343.57 us355.37 us2,869.9614.1602-119.24 KB
BenchmarkNestedQueryPlanned305.32 us5.903 us7.249 us303.15 us297.22 us323.09 us3,275.3013.1836-108.58 KB
BenchmarkParallelQueryPlanned62,618.70 us937.705 us877.130 us62,340.86 us61,426.42 us64,221.00 us15.97--279.74 KB

After

MethodMeanErrorStdDevMedianMinMaxOp/sGen0Gen1Allocated
BenchmarkSimpleQueryUnparsed89.63 us1.688 us2.820 us88.33 us86.25 us97.69 us11,157.482.3193-19.36 KB
BenchmarkSimpleQueryParsed69.13 us1.367 us2.883 us68.07 us65.87 us76.87 us14,465.451.0986-9.92 KB
BenchmarkSimpleQueryPlanned29.83 us0.373 us0.311 us29.82 us29.25 us30.25 us33,522.070.9460-7.94 KB
BenchmarkFlatQueryUnparsed263.27 us4.572 us4.276 us262.55 us257.60 us271.51 us3,798.328.3008-71.34 KB
BenchmarkFlatQueryParsed237.67 us3.400 us3.180 us236.84 us232.78 us242.94 us4,207.586.3477-55.44 KB
BenchmarkFlatQueryPlanned190.26 us2.911 us2.723 us189.99 us185.39 us195.14 us5,255.866.34770.488352.06 KB
BenchmarkNestedQueryUnparsed407.63 us3.594 us3.186 us406.67 us403.32 us412.80 us2,453.2020.99610.4883171.81 KB
BenchmarkNestedQueryParsed365.66 us3.679 us3.261 us364.98 us361.34 us373.19 us2,734.7914.6484-122.54 KB
BenchmarkNestedQueryPlanned313.22 us3.549 us3.320 us312.46 us309.24 us318.56 us3,192.6413.6719-111.88 KB
BenchmarkParallelQueryPlanned62,148.46 us472.287 us394.381 us62,091.31 us61,677.59 us63,141.53 us16.09--276.18 KB

Line by line

MethodMeanErrorStdDevMedianMinMaxOp/sGen0Gen1Allocated
BenchmarkSimpleQueryUnparsed85.76 us1.232 us1.092 us85.72 us83.60 us87.16 us11,660.352.1973-18.76 KB
BenchmarkSimpleQueryUnparsed89.63 us1.688 us2.820 us88.33 us86.25 us97.69 us11,157.482.3193-19.36 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkSimpleQueryParsed72.29 us1.858 us5.421 us70.58 us64.11 us85.09 us13,832.251.0986-9.32 KB
BenchmarkSimpleQueryParsed69.13 us1.367 us2.883 us68.07 us65.87 us76.87 us14,465.451.0986-9.92 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkSimpleQueryPlanned33.19 us1.559 us4.474 us31.79 us27.82 us46.85 us30,131.190.8850-7.34 KB
BenchmarkSimpleQueryPlanned29.83 us0.373 us0.311 us29.82 us29.25 us30.25 us33,522.070.9460-7.94 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkFlatQueryUnparsed239.63 us4.740 us10.795 us241.52 us223.64 us270.59 us4,173.097.3242-62.97 KB
BenchmarkFlatQueryUnparsed263.27 us4.572 us4.276 us262.55 us257.60 us271.51 us3,798.328.3008-71.34 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkFlatQueryParsed207.96 us2.940 us2.455 us207.71 us202.99 us212.43 us4,808.635.61520.244147 KB
BenchmarkFlatQueryParsed237.67 us3.400 us3.180 us236.84 us232.78 us242.94 us4,207.586.3477-55.44 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkFlatQueryPlanned163.65 us3.044 us2.698 us163.58 us160.08 us168.58 us6,110.625.12700.244143.66 KB
BenchmarkFlatQueryPlanned190.26 us2.911 us2.723 us189.99 us185.39 us195.14 us5,255.866.34770.488352.06 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkNestedQueryUnparsed413.30 us8.226 us16.987 us409.96 us389.94 us460.48 us2,419.5720.50780.4883168.51 KB
BenchmarkNestedQueryUnparsed407.63 us3.594 us3.186 us406.67 us403.32 us412.80 us2,453.2020.99610.4883171.81 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkNestedQueryParsed348.44 us3.702 us3.463 us348.09 us343.57 us355.37 us2,869.9614.1602-119.24 KB
BenchmarkNestedQueryParsed365.66 us3.679 us3.261 us364.98 us361.34 us373.19 us2,734.7914.6484-122.54 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkNestedQueryPlanned305.32 us5.903 us7.249 us303.15 us297.22 us323.09 us3,275.3013.1836-108.58 KB
BenchmarkNestedQueryPlanned313.22 us3.549 us3.320 us312.46 us309.24 us318.56 us3,192.6413.6719-111.88 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:
BenchmarkParallelQueryPlanned62,618.70 us937.705 us877.130 us62,340.86 us61,426.42 us64,221.00 us15.97--279.74 KB
BenchmarkParallelQueryPlanned62,148.46 us472.287 us394.381 us62,091.31 us61,677.59 us63,141.53 us16.09--276.18 KB
-------------------------------------------:-----------:-----------:-------------:-------------:-------------:----------:--------:-------:----------:

@valbersvalbers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xperiandri is it possible to remove the commits from the previous PRs and have only the commits concerning the changes for this PR in this PR?

Comment threadsrc/FSharp.Data.GraphQL.Shared/Helpers/PooledResizeArray.fs
@xperiandri
xperiandriforce-pushed the PooledResizeArray_optimization branch 2 times, most recently from ea6d713 to 693ea56CompareMarch 24, 2024 15:13
@xperiandri
xperiandriforce-pushed the PooledResizeArray_optimization branch from 693ea56 to 255db1fCompareMarch 24, 2024 18:05

@valbersvalbers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@xperiandri@valbers