trino icon indicating copy to clipboard operation
trino copied to clipboard

Fix a hot loop in DirectExchangeClient

Open surajkn opened this issue 9 months ago • 3 comments

Description

The fix changes queuedClients to LinkedHashSet, this helps with the filter condition in scheduleRequestIfNecessary. In addition two for loops are modified to become one loop on Iterator.

Additional context and related issues

We experienced some performance regression as a result of https://github.com/trinodb/trino/commit/1ef442738fc51d1d7cf167bf6ca413378d928026 and this is an attempt to fix the same.

Release notes

( ) This is not user-visible or is docs only, and no release notes are required. (x ) Release notes are required. Please propose a release note for me. ( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

surajkn avatar May 20 '24 18:05 surajkn