Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success Request List Performance Improvement #1131

Merged
merged 2 commits into from
May 28, 2020

Conversation

alistairjevans
Copy link
Member

Switched to tracking the 'next' position in the list, rather than resetting it.

Also experimented with the initial capacity. Ended up settling on an initial capacity of 32. It's a fair bit bigger than the default, but for complex graphs performance does improve some. I think it's worth the small amount of extra memory in simple graphs, to give us better performance in complex graphs.

Used the Deep Graph bench because that has a lot of requests in it.

Original (v6)

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 18.37 us 0.135 us 0.120 us 4.1504 - - 17.05 KB

Track Position

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 17.57 us 0.189 us 0.177 us 4.1504 - - 17 KB

Track Position + Allocate Custom Initial Capacity (12)

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 17.62 us 0.123 us 0.109 us 4.1809 0.0305 - 17.16 KB

Track Position + Allocate Custom Initial Capacity (32)

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 17.45 us 0.178 us 0.139 us 4.0894 - - 16.71 KB

Copy link
Member

@tillig tillig left a comment

Choose a reason for hiding this comment

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

Interesting how little stuff like this can make a difference. I wish it was more "pit of success" than having to do weird workarounds like this, but I guess that's why they pay us the big bucks. (?)

@tillig tillig merged commit ef048bc into autofac:v6 May 28, 2020
@alistairjevans
Copy link
Member Author

I guess 99.5% of developers just don't need to worry about performance to this degree, so the existing 'pit of basically fine' works well enough.

@tillig
Copy link
Member

tillig commented May 28, 2020

I'm absolutely working "pit of basically fine" into a presentation sometime in the near future.

@alistairjevans alistairjevans mentioned this pull request May 28, 2020
3 tasks
@alistairjevans alistairjevans deleted the success-request-perf branch May 29, 2020 06:59
@alistairjevans alistairjevans added this to the v6.0 milestone Sep 26, 2020
Sign up for free to 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.

None yet

2 participants