You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "gongxuanzhang (via GitHub)" <gi...@apache.org> on 2025/04/05 17:19:57 UTC

[PR] MINOR: small optimization by judgment [kafka]

gongxuanzhang opened a new pull request, #19386:
URL: https://github.com/apache/kafka/pull/19386

   judgments can help avoid unnecessary `segments.sizeInBytes()`  loops 
   
   by https://github.com/apache/kafka/pull/18393/files#r2029925512


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah commented on PR #19386:
URL: https://github.com/apache/kafka/pull/19386#issuecomment-2842222599

   @gongxuanzhang (et al.) -- I was reading through the Git log and noticed this rather vague commit message. Can we try to have more descriptive commit subjects? E.g., "Avoid unnecessary trace logging call in LocalLog" or similar.
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "bh-tt (via GitHub)" <gi...@apache.org>.
bh-tt commented on PR #19386:
URL: https://github.com/apache/kafka/pull/19386#issuecomment-2898172902

   I've some statistics from a medium busy kafka broker running on 4.0 (about 2 cpu's used continuously): method profiling from a JFR gave me approximately 3% of cpu usage spent in java.util.stream.StreamOpFlag.fromCharacteristics and 2% spent in the LogSement::size function. This is a significant increase amount of cpu, thanks for spotting it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "gongxuanzhang (via GitHub)" <gi...@apache.org>.
gongxuanzhang commented on PR #19386:
URL: https://github.com/apache/kafka/pull/19386#issuecomment-2781166844

   @chia7712 PTAL


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #19386:
URL: https://github.com/apache/kafka/pull/19386#issuecomment-2781471808

   We should probably cherry-pick this to the 4.0 branch. The original problem was introduced then, is that right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #19386:
URL: https://github.com/apache/kafka/pull/19386


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #19386:
URL: https://github.com/apache/kafka/pull/19386#issuecomment-2781503458

   > I will backport this PR to 4.0
   
   done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #19386:
URL: https://github.com/apache/kafka/pull/19386#issuecomment-2842308811

   @mumrah Sorry about the unclear commit message. It won't happen again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: small optimization by judgment [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #19386:
URL: https://github.com/apache/kafka/pull/19386#issuecomment-2781502257

   > The original problem was introduced then, is that right?
   
   yes, that is related to https://github.com/apache/kafka/commit/6e88c10ed5628ff31c0aa3096d16a1c78ef3127f. I will backport this PR to 4.0 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org