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

refactor: pass large structure by const reference on every RPC call #5780

Merged

Conversation

PastaPastaPasta
Copy link
Member

Issue being fixed or feature implemented

We are passing this large data structure by value

I would argue that we backport this to 20.0.3 as this seems likely to cause significant performance hits on RPC calls; thoughts?

What was done?

Pass by const reference

How Has This Been Tested?

Building

Breaking Changes

None

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

I wouldn't call this

dash/src/rpc/server.cpp

Lines 143 to 152 in 4fc4448

mapPlatformRestrictions = {
{"getbestblockhash", {}},
{"getblockhash", {}},
{"getblockcount", {}},
{"getbestchainlock", {}},
{"quorum", {"sign", static_cast<uint8_t>(Params().GetConsensus().llmqTypePlatform)}},
{"quorum", {"verify"}},
{"submitchainlock", {}},
{"verifyislock", {}},
};
large :) but makes sense to fix it anyway I guess.

utACK

Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

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

utACK

@PastaPastaPasta PastaPastaPasta merged commit acd2acd into dashpay:develop Dec 21, 2023
10 checks passed
@UdjinM6 UdjinM6 modified the milestones: 20.1, 20.0.3 Dec 24, 2023
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.

4 participants