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

Create only one cloned snapshot for persist? #1601

Closed
Qiao-Jin opened this issue Apr 23, 2020 · 2 comments · Fixed by #1602
Closed

Create only one cloned snapshot for persist? #1601

Qiao-Jin opened this issue Apr 23, 2020 · 2 comments · Fixed by #1602
Labels
discussion Initial issue state - proposed but not yet accepted

Comments

@Qiao-Jin
Copy link
Contributor

Currently during persisting, for each transaction we will create a cloned snapshot, which can be time consuming for heavy workload:

using (ApplicationEngine engine = new ApplicationEngine(TriggerType.Application, tx, snapshot.Clone(), tx.SystemFee))

So why not create a snapshot beforehead and reuse it for all transactions? Such functionality would enhance TPS by about 50% in my local env.

@Qiao-Jin Qiao-Jin added the discussion Initial issue state - proposed but not yet accepted label Apr 23, 2020
@shargon
Copy link
Member

shargon commented Apr 23, 2020

If you don't clone the snapshot, and the transaction FAULT, the state will be persisted.

@Qiao-Jin
Copy link
Contributor Author

If you don't clone the snapshot, and the transaction FAULT, the state will be persisted.

That's right, so we need to clone once more for such occasions:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants