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

perf: call increment once #13193

Merged
merged 1 commit into from
Dec 6, 2024
Merged

perf: call increment once #13193

merged 1 commit into from
Dec 6, 2024

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Dec 6, 2024

ref #13187

cc @hai-rise

further @hai-rise I think we can make this a reference:

pub(crate) fn update(
&mut self,
changed_accounts: HashMap<SenderId, SenderInfo>,
) -> Vec<PoolUpdate> {

and change the order

// track changed accounts
self.sender_info.extend(changed_senders.clone());
// Apply the state changes to the total set of transactions which triggers sub-pool updates.
let updates = self.all_transactions.update(changed_senders);

@mattsse mattsse added the C-perf A change motivated by improving speed, memory usage or disk footprint label Dec 6, 2024
@mattsse mattsse enabled auto-merge December 6, 2024 20:47
@mattsse mattsse added the A-tx-pool Related to the transaction mempool label Dec 6, 2024
@mattsse mattsse requested a review from Rjected December 6, 2024 20:47
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

yep makes sense

@mattsse mattsse added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit e991570 Dec 6, 2024
42 checks passed
@mattsse mattsse deleted the matt/only-call-inc-once branch December 6, 2024 21:21
lean-apple pushed a commit to lean-apple/reth that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to the transaction mempool C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants