[
https://issues.apache.org/jira/browse/HBASE-29160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wellington Chevreuil resolved HBASE-29160.
------------------------------------------
Resolution: Fixed
Merged into master, branch-3, branch-2, branch-2.6 and branch-2.5. Thanks for
the contribution, [~charlesconnell] !
> Cache result of getRegionNameAsString()
> ---------------------------------------
>
> Key: HBASE-29160
> URL: https://issues.apache.org/jira/browse/HBASE-29160
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 3.0.0-beta-1, 4.0.0-alpha-1, 2.7.0, 2.5.11, 2.6.2
> Reporter: Charles Connell
> Assignee: Charles Connell
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-1
>
> Attachments: slow-region-name-1.html, slow-region-name-2.html,
> slow-region-name-3.html
>
>
> I've noticed that tracing can add meaningful CPU cycles to each HBase query.
> This is easy to correct, it turns out. Creating a tracing span is slow
> because region names are attached to the spans, and calls to
> {{RegionInfo#getRegionNameAsString()}} are expensive. This method
> re-generates the region name string on each call, which is not necessary. In
> this ticket I'll make it cache this string.
> See the attached CPU-time profiles where {{getRegionNameAsString()}} occupies
> 0.5% - 2%.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)