hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
313 stars 138 forks source link

To optimize com.swirlds.platform.ConsensusImpl.stronglySeeP() #15344

Closed alex-kuzmin-hg closed 3 weeks ago

alex-kuzmin-hg commented 2 months ago

Problem

Per performance profile truage, it was suggested to submit this ticked for optimization effort of com.swirlds.platform.ConsensusImpl.stronglySeeP() that introduces O(n^2) cost image

Solution

To review and optimize

Alternatives

No response

alex-kuzmin-hg commented 2 months ago

On Perf Engineering site: https://perf.analytics.eng.hashgraph.io/permanent/engnet2-20240906_175600/reports/com.swirlds.platform.ConsensusImpl.html#1052

lpetrovic05 commented 3 weeks ago

Based on a discussion with Leemon, there is no way to reduce the algorithmic complexity of this code.

alex-kuzmin-hg commented 3 weeks ago

Thanks. Thus, we can close as Will-Not-Fix. If there will be any optimizations that Leemon suggested, I'd be happy to test over...

lpetrovic05 commented 3 weeks ago

Thanks. Thus, we can close as Will-Not-Fix. If there will be any optimizations that Leemon suggested, I'd be happy to test over...

Leemon is planning on writing the whole of Consensus from scratch, so when he's done, we can test that for performance