Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

use a single transaction for each generation when importing data from a file #18606

Open altendky opened 2 months ago

altendky commented 2 months ago

Purpose:

Improve runtime of insertion to the datalayer db from dat files. This occurs when syncing a new update, for example.

many transactions - full file: 3.6s one transaction - full file: 2.2s

many transactions - delta file: 0.97s one transaction - delta file: 0.49s

Current Behavior:

New Behavior:

Testing Notes:

arvidn commented 2 months ago

perhaps I jumped the gun; but it would be nice to have some rationale in the description. did you measure any difference?

altendky commented 2 months ago

I did, and was discussing with Earle. (or sending messages to be discussed when they wake up :]) But yes, having info here would be good as well. Thanks.

github-actions[bot] commented 1 month ago

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] commented 4 days ago

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.