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

[BitSail][core]fixed row utils high cpu usage issue. #202

Merged
merged 1 commit into from
Nov 23, 2022

Conversation

hk-lrzy
Copy link
Collaborator

@hk-lrzy hk-lrzy commented Nov 22, 2022

Signed-off-by:

Pre-Checklist

Note: Please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests.

Purpose

In history, we use RowUtil to calcalate object size for the reader and writer side. In most case we directly return the constants for the object, but when we we meet object like bigdecimal or biginteger or any object else, we will try use ObjectSizeCalculator.getObjectSize to calcualte object size.

ObjectSizeCalculator.getObjectSize is simple enought to let us get real object size, but it will consumer more CPU usage than we think.

We compare the profile usage between the ObjectSizeCalculator.getObjectSize and constants value, it show there will have 50% extra CPU usgae in the ObjectSizeCalculator.getObjectSize case.
Some description about what this PR wants to do.

截屏2022-11-22 21 21 33

截屏2022-11-22 21 21 43

Approaches

Some description about how this PR achives the purpose.

Related Issues

e.g. Close #796

New Behavior (screenshots if needed)

N/A

@hk-lrzy hk-lrzy changed the title [BitSail][core]fixed row utils high usage cpu issue. [BitSail][core]fixed row utils high cpu usage issue. Nov 22, 2022
@hk-lrzy hk-lrzy merged commit 5c66329 into bytedance:master Nov 23, 2022
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