-
Notifications
You must be signed in to change notification settings - Fork 1.7k
More performance optimizations #1814
Conversation
arkpar
commented
Aug 3, 2016
- Moved DB commit out of the import lock. DB WAL should not hurt performance anymore on a multicore system
- Moved RLP compression to background as well
- Reduced last_hashes cloning
- Other minor tweaks
Changes Unknown when pulling f723e57 on perf into * on master*. |
Changes Unknown when pulling 9b87657 on perf into * on master*. |
does the DB write queue form a read cache, also? otherwise how is cohesion enforced while the write-queue is non-empty? |
It does, that's the whole point |
@@ -498,7 +498,7 @@ pub fn enact( | |||
tracing: bool, | |||
db: Box<JournalDB>, | |||
parent: &Header, | |||
last_hashes: LastHashes, | |||
last_hashes: Arc<LastHashes>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like all of these Arc<LastHashes>
could just be a &LastHashes
and we would save a few atomic ops in a bottleneck.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and then since LastHashes
appears to be just a Vec<H256>
, why not just have the last hashes field be a &[H256]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing EnvInfo
to hold a reference is much more involved. I'll leave it to future PR.
a few issues in the unsafe code introduced here and still a little more room for optimization, otherwise LGTM |