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

Use smartpointers for DagBlock and avoid unnecessary copies #2883

Merged

Conversation

JakubFornadel
Copy link
Collaborator

@JakubFornadel JakubFornadel commented Nov 2, 2024

Part of the codebase was using raw DagBlock objects, another part was using std::shared_ptr. As a result, we were making DagBlock object copies a lot, which is expensive... see DagManager::getDagBlock(const blk_hash_t &hash) method

The codebase is now united and we are using only smart pointers...

Purpose

How does the solution address the problem

Changes made

Copy link

github-actions bot commented Nov 2, 2024

Related Issue

@JakubFornadel JakubFornadel force-pushed the issue-2869/refacgor_dag_sync_packet branch from d67062a to 7f02708 Compare November 5, 2024 15:49
@JakubFornadel JakubFornadel requested review from mfrankovi, kstdl and MatusKysel and removed request for mfrankovi and kstdl November 5, 2024 15:49
@JakubFornadel JakubFornadel changed the title refactor dag blocks processing to work with shared pointers to avoid … Use smartpointers for DagBlock and avoid unnecessary copies Nov 5, 2024
@JakubFornadel JakubFornadel force-pushed the issue-2869/refacgor_dag_sync_packet branch from 7f02708 to 2d1bd42 Compare November 5, 2024 15:54
@JakubFornadel JakubFornadel merged commit c8d0670 into issue-1830/packets-encoding Nov 8, 2024
1 check passed
@JakubFornadel JakubFornadel deleted the issue-2869/refacgor_dag_sync_packet branch November 8, 2024 08:59
@taraxadeploy
Copy link
Collaborator

prnet cleaned-up successfully

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.

2 participants