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

[ISSUE #8879] reduce seach key times in method,to import performance #8880

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ChineseTony
Copy link
Contributor

@ChineseTony ChineseTony commented Oct 30, 2024

Which Issue(s) This PR Fixes

Fixes #8879

Brief Description

How Did You Test This Change?

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.54%. Comparing base (dd62ed0) to head (f4eb1f0).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8880      +/-   ##
=============================================
- Coverage      47.61%   47.54%   -0.08%     
+ Complexity     11752    11733      -19     
=============================================
  Files           1304     1304              
  Lines          91043    91037       -6     
  Branches       11675    11673       -2     
=============================================
- Hits           43354    43280      -74     
- Misses         42352    42414      +62     
- Partials        5337     5343       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qianye1001
Copy link
Contributor

If refactoring this part of the code, it might be simpler to use ConcurrentHashMap instead of HashMap.

@ChineseTony
Copy link
Contributor Author

ok, I will chage this code

   private boolean isFieldNullable(Field field) {
        return ConcurrentHashMapUtils.computeIfAbsent(NULLABLE_FIELD_CACHE, field, input -> {
            Annotation annotation = input.getAnnotation(CFNotNull.class);
            return annotation == null;
        });
    }

Copy link
Contributor

@RongtongJin RongtongJin left a comment

Choose a reason for hiding this comment

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

Could you provide specific performance improvement data using tests? It would be better to use tests to also verify correctness.

@ChineseTony
Copy link
Contributor Author

ok,thanks ,but isFieldNullable function can use temp variable to save and reture the value ,Don't need search key twice

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.

[Enhancement] reduce seach key times in method,to import performance
4 participants