-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
perf(handler) do not use cache with dbless when looking up service for route #8972
Conversation
dd6e570
to
2de9bc9
Compare
🚀 Performance test resultTest Suite: 01-rps 02-flamegraph (baseline,single_route,simple) Click to expand
Download Artifacts for detailed results and interactive SVG flamegraphs. |
…r route ### Summary It does not make sense to use cache with dbless where the data is already in memory, especially because the route rebuild process can use a lookup table. It also consumes a lot of memory to have service in: 1. lmdb (in memory) 2. shared dictionary (in memory) 3. worker local memory So this commit removes the unneccessary use of cache here.
2de9bc9
to
63d9f45
Compare
🚀 Performance test resultTest Suite: 01-rps 02-flamegraph (baseline,single_route,simple) Click to expand
Download Artifacts for detailed results and interactive SVG flamegraphs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only affects the loading of services when building the (old) router on dbless and if I understood this comment correctly:
the route rebuild process can use a lookup table
We are using some other kind of cache (lookup table) for the services when rebuilding the Router. That would mean that this change would only affect the initial building of the router.
I spent some time trying to find now build_router
changed in the flamegraphs, but could not find it - is this expected?
In principle I am not opposed to this, so I give it a +1.
Summary
It does not make sense to use cache with dbless where the data is already in memory, especially because the route rebuild process can use a lookup table.
It also consumes a lot of memory to have service in:
So this commit removes the unneccessary use of cache here.
Reading shdict also causes locking.