Browse Source
`Node` is immutable so this is safe. With 100 brokers, 150 topics and 350 partitions, `HashSet.contains` in `RecordAccumulator.ready` took about 40% of the application time. It is caused by re-calculating a hash code of a leader (Node instance) for every batch entry. Caching the hashCode reduced the time of `HashSet.contains` in `RecordAccumulator.ready` to ~2%. The measurements were taken with Flight Recorder. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Ted Yu <yuzhihong@gmail.com>, Ismael Juma <ismael@juma.me.uk>pull/4577/head
Eugene Sevastyanov
7 years ago
committed by
Ismael Juma
1 changed files with 19 additions and 26 deletions
Loading…
Reference in new issue