-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Performance degradation #4356
Comments
Oren, great catch. We’ll come up a fix soon. |
It seems that finding matching bindings by tag can be expensive as we iterate through all bindings in the context hierarchy. I'll try to create an index for bindings by tag to see if it helps. |
|
Hi, There is ~15% improvement after the fix. Thanks for the quick fix. Oren |
Fixes #4356 - use one function to listen on bind/unbind events - set default maxListeners to Infinity - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - use one function to listen on bind/unbind events - set default maxListeners to Infinity - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - use one function to listen on bind/unbind events - set default maxListeners to Infinity - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - use one function to listen on bind/unbind events - set default maxListeners to Infinity - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - use one function to listen on bind/unbind events - set default maxListeners to Infinity - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
Hi,
Thanks, |
|
Fixes #4356 - create index for bindings by tag - optimize find bindings by tag - leverage findByTag for filterByTag to find matching bindings
@orensolo It's released in |
Thanks |
Steps to reproduce
Run performance tests, when the performance criteria are requests per second and latency.
Current Behavior
I am using
"@loopback/context": "^1.25.0"
, and I noticed a degradation in performance.After analyzing the results using a profiler, I found out that interceptors loading is one of the main causes of this degradation.
Specifically, the following line (in
getGlobalInterceptorBindingKeys
function ofInterceptedInvocationContext
class) is causing a performance issue :After forcing the
controllerRoute
to useinvokeTargetMethodWithInjection
instead ofinvokeMethodWithInterceptors
, the performance (Requests per seconds) improved by 25%.Note also that I don't use interceptors in my application.
Expected Behavior
No degradation in performance after upgrading loopback
The text was updated successfully, but these errors were encountered: