dotnet / dotnet/macios

[net6] `mono_threads_enter_gc_safe_region_unbalanced` performance regression

Open
#14,835 3 comments 1 reaction 0 assignees View on GitHub
bug performance regression
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

### Steps to Reproduce

Invoke `UIView.get_Superview` in a loop.

Xamarin:
![image](https://user-images.githubusercontent.com/5839577/165538566-dfa157e2-4bf7-47b4-bbd9-ede66f13b6b7.png)

.NET 6 RC1:
![image](https://user-images.githubusercontent.com/5839577/165538638-849a5ff5-7e6a-45e8-820c-34b110079f50.png)

My guess is that it is caused by changes in `mono_threads_enter_gc_safe_region_unbalanced`, but I'm not completely sure.

### Expected Behavior
Performance is similar or better than Xamarin.iOS.

### Actual Behavior
Performance is slower around 20%.

### Environment

.NET 6 Mobile RC1

### Build Logs

### Example Project (If Possible)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.