Skip to content

[ISSUE #3585] [Part H] Avoid unnecessary StringBuilder resizing on critical path #3612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

Zanglei06
Copy link
Contributor

org.apache.rocketmq.broker.longpolling.PullRequestHoldService#buildKey is called 2 times per msg when long polling is enabled. It is better to give a capacity needed.

@Zanglei06 Zanglei06 changed the title [ISSUE 3585] [Part G] Avoid unnecessary StringBuilder resizing on critical path [ISSUE 3585] [Part H] Avoid unnecessary StringBuilder resizing on critical path Dec 9, 2021
@Zanglei06 Zanglei06 force-pushed the improve_build_key_dev branch from c97ae34 to 41832f7 Compare December 9, 2021 12:24
@areyouok areyouok linked an issue Dec 9, 2021 that may be closed by this pull request
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 55.12% when pulling 41832f7 on Zanglei06:improve_build_key_dev into 1e314f4 on apache:develop.

@codecov-commenter
Copy link

Codecov Report

Merging #3612 (41832f7) into develop (e2a4b37) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3612   +/-   ##
==========================================
  Coverage      48.82%   48.82%           
- Complexity      4643     4652    +9     
==========================================
  Files            555      555           
  Lines          36721    36727    +6     
  Branches        4835     4840    +5     
==========================================
+ Hits           17930    17933    +3     
- Misses         16539    16545    +6     
+ Partials        2252     2249    -3     
Impacted Files Coverage Δ
...tmq/broker/longpolling/PullRequestHoldService.java 20.48% <0.00%> (ø)
...tmq/logappender/log4j2/RocketmqLog4j2Appender.java 35.00% <0.00%> (-10.00%) ⬇️
...pl/consumer/ConsumeMessageConcurrentlyService.java 47.57% <0.00%> (-0.98%) ⬇️
...he/rocketmq/client/impl/consumer/ProcessQueue.java 60.93% <0.00%> (-0.94%) ⬇️
...mq/client/consumer/store/LocalFileOffsetStore.java 56.31% <0.00%> (-0.56%) ⬇️
...lient/impl/consumer/DefaultMQPushConsumerImpl.java 39.64% <0.00%> (-0.53%) ⬇️
...mq/client/impl/producer/DefaultMQProducerImpl.java 46.44% <0.00%> (-0.13%) ⬇️
...in/java/org/apache/rocketmq/test/util/MQAdmin.java 44.44% <0.00%> (ø)
...n/java/org/apache/rocketmq/test/util/FileUtil.java 0.00% <0.00%> (ø)
...java/org/apache/rocketmq/common/Configuration.java 0.00% <0.00%> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2a4b37...41832f7. Read the comment docs.

@areyouok areyouok merged commit 38b20fb into apache:develop Dec 10, 2021
@yuz10 yuz10 added this to the 4.9.3 milestone Dec 10, 2021
@francisoliverlee francisoliverlee changed the title [ISSUE 3585] [Part H] Avoid unnecessary StringBuilder resizing on critical path [ISSUE #3585] [Part H] Avoid unnecessary StringBuilder resizing on critical path Feb 21, 2022
devfat pushed a commit to devfat/rocketmq that referenced this pull request Mar 3, 2022
…tical path (apache#3612)

Co-authored-by: zanglei <zanglei@kuaishou.com>
GenerousMan pushed a commit to GenerousMan/rocketmq that referenced this pull request Aug 12, 2022
…tical path (apache#3612)

Co-authored-by: zanglei <zanglei@kuaishou.com>
carlvine500 pushed a commit to carlvine500/rocketmq-apache that referenced this pull request Sep 10, 2024
…tical path (apache#3612)

Co-authored-by: zanglei <zanglei@kuaishou.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve performance for 4.9.2
6 participants