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

Lazy load nested items during contract call #7953

Merged
merged 29 commits into from
Apr 12, 2024

Conversation

IvanKavaldzhiev
Copy link
Contributor

@IvanKavaldzhiev IvanKavaldzhiev commented Mar 22, 2024

Description:

This PR enhances db accessors' performance by lazy loading some of the nested fields, which are not always directly used when fetching the models.
Related issue(s):

Fixes #7903

Notes for reviewer:

To be tested with acceptance and K6 tests
Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@IvanKavaldzhiev IvanKavaldzhiev added performance web3 Area: Web3 API limechain Work planned for the LimeChain team labels Mar 22, 2024
@IvanKavaldzhiev IvanKavaldzhiev self-assigned this Mar 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 77.82427% with 53 lines in your changes are missing coverage. Please review.

Project coverage is 92.21%. Comparing base (56321ab) to head (c3dd598).
Report is 1 commits behind head on main.

Files Patch % Lines
...n/java/com/hedera/services/store/models/Token.java 71.57% 0 Missing and 27 partials ⚠️
...java/com/hedera/services/store/models/Account.java 79.16% 1 Missing and 14 partials ⚠️
...edera/services/store/models/TokenRelationship.java 81.48% 0 Missing and 5 partials ⚠️
...re/contract/HederaEvmStackedWorldStateUpdater.java 25.00% 3 Missing ⚠️
...ervices/txns/crypto/AbstractAutoCreationLogic.java 25.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #7953       +/-   ##
=============================================
+ Coverage     64.28%   92.21%   +27.92%     
- Complexity      219     7249     +7030     
=============================================
  Files            75      894      +819     
  Lines          2453    29225    +26772     
  Branches         48     3561     +3513     
=============================================
+ Hits           1577    26949    +25372     
- Misses          837     1455      +618     
- Partials         39      821      +782     

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

@steven-sheehy steven-sheehy added this to the 0.102.0 milestone Mar 25, 2024
@steven-sheehy steven-sheehy changed the title HIP-584: Apply lazy loading for db accessors Lazy load nested items during contract call Mar 26, 2024
steven-sheehy
steven-sheehy previously approved these changes Mar 31, 2024
Copy link
Member

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

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

LGTM

kselveliev
kselveliev previously approved these changes Apr 1, 2024
Copy link
Contributor

@kselveliev kselveliev left a comment

Choose a reason for hiding this comment

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

LGTM

@steven-sheehy steven-sheehy modified the milestones: 0.102.0, 0.103.0 Apr 1, 2024
steven-sheehy
steven-sheehy previously approved these changes Apr 12, 2024
Copy link
Member

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

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

LGTM 🥂

Signed-off-by: IvanKavaldzhiev <[email protected]>
Copy link

sonarcloud bot commented Apr 12, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@steven-sheehy steven-sheehy merged commit 7ecc1e2 into main Apr 12, 2024
26 checks passed
@steven-sheehy steven-sheehy deleted the 07903-apply-lazy-loading-for-db-accessors branch April 12, 2024 19:00
@steven-sheehy steven-sheehy added the enhancement Type: New feature label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature limechain Work planned for the LimeChain team performance web3 Area: Web3 API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lazy load EVM entity objects
4 participants