Skip to content
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

perf(s3stream): cache parsed DataBlockIndex for IndexBlock #916

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lifepuzzlefun
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4dae71c) 55.91% compared to head (435e1c5) 55.91%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #916   +/-   ##
=========================================
  Coverage     55.91%   55.91%           
  Complexity     1265     1265           
=========================================
  Files           133      133           
  Lines          8534     8534           
  Branches        789      789           
=========================================
  Hits           4772     4772           
  Misses         3327     3327           
  Partials        435      435           
Components Coverage Δ
RocketMQ Broker ∅ <ø> (∅)
RocketMQ Common 5.80% <ø> (ø)
RocketMQ Controller 57.39% <ø> (ø)
RocketMQ Proxy 37.18% <ø> (ø)
RocketMQ Store 73.65% <ø> (ø)
RocketMQ Stream ∅ <ø> (∅)
RocketMQ Metadata 35.44% <ø> (ø)

@@ -200,12 +200,14 @@ public static class IndexBlock {
private final ByteBuf buf;
private final int size;
private final int count;
private DataBlockIndex[] dataBlockIndices;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T he main considerations for parsing from buf are:

  • Parsing the data block index is not frequent,
  • Parsing from buf has a low cost.
  • Saving heap memory consumption.

If this becomes a CPU bottleneck, further optimization can be done.

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.

2 participants