Skip to content

Conversation

@danmoseley
Copy link
Member

@danmoseley danmoseley commented Apr 14, 2022

Fix #67878

The string being constructed by this assert substantially slows down the JSON tests, so much that on slow machines they time out.

Before (on my machine) System.Text.Json tests -- 34sec .NET 7 tests/208sec .NET Framework tests. Helix only allows 2700 seconds; I guess 32 bit Arm machines are about 10x slower than mine.
After 39/107

@danmoseley danmoseley requested a review from krwq April 14, 2022 16:41
@ghost ghost assigned danmoseley Apr 14, 2022
@ghost
Copy link

ghost commented Apr 14, 2022

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix #67878

The string being constructed by this assert substantially slows down the JSON tests, so much that on slow machines they time out.

Author: danmoseley
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@danmoseley
Copy link
Member Author

Committing without validation as it's a small change and this is taking out PR validation.

@danmoseley danmoseley merged commit 419d972 into dotnet:main Apr 14, 2022
@danmoseley danmoseley deleted the disable.json.arm branch April 14, 2022 16:54
@stephentoub
Copy link
Member

stephentoub commented Apr 14, 2022

Is the slow down only happening on pre-.NET 6 builds? That string should never be evaluated on .NET 6+ unless the assert fails.

@danmoseley
Copy link
Member Author

Right, I was working against main, but the slowdown was when the tests ran on .NET Framework which is consistent with your observation.

@stephentoub
Copy link
Member

In case anyone ever wonders why the new interpolated string handler overloads we added to Debug.Assert are useful ;-)

@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeouts in System.Text.Json.Tests on arm32

3 participants