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

Optimize magnet generation #594

Merged
merged 1 commit into from Jul 12, 2020
Merged

Optimize magnet generation #594

merged 1 commit into from Jul 12, 2020

Conversation

TheAMM
Copy link
Contributor

@TheAMM TheAMM commented Oct 31, 2019

with our trusty tool: caching!

Turns out the old cache.memoize wasn't doing much at all. Implement working caching for the magnet uri generation.

Bench

Before patch
Page   1: min: 59.0ms max: 72.9ms avg: 67.1ms
Page   2: min: 56.2ms max: 97.6ms avg: 66.1ms
Page   3: min: 60.1ms max: 92.4ms avg: 69.3ms
Page   4: min: 59.9ms max: 88.0ms avg: 68.8ms
Page   5: min: 60.1ms max: 90.9ms avg: 67.1ms

With patch
Page   1: min: 42.0ms max: 57.5ms avg: 50.1ms
Page   2: min: 44.9ms max: 61.4ms avg: 50.7ms
Page   3: min: 43.9ms max: 64.1ms avg: 50.1ms
Page   4: min: 45.9ms max: 62.2ms avg: 52.4ms
Page   5: min: 45.6ms max: 76.2ms avg: 53.4ms

With patch + baked + count cache
Page   1: min: 27.3ms max: 36.6ms avg: 30.0ms
Page   2: min: 25.8ms max: 40.0ms avg: 29.4ms
Page   3: min: 25.3ms max: 40.9ms avg: 31.9ms
Page   4: min: 25.1ms max: 43.4ms avg: 30.8ms
Page   5: min: 25.5ms max: 63.2ms avg: 33.1ms

Yeah look and drool.

with our trusty tool: caching!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants