google / google/guice

Performance Issue in getJustInTimeBinding Method

Open
#1,757 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

In getJustInTimeBinding(Key key, Errors errors, JitLimitation jitType) method we are taking lock even in cases where we have already cached result in jitBindingData. Which is affecting our application performance.

Below screenshot of code block where this issue is present.
Screenshot 2023-07-28 at 4 28 06 PM

Suggested changes :
Can we return BindingImpl if its already present in our cache instead of taking lock , this will remove unnecessary contentions among threads ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.