[
https://issues.apache.org/jira/browse/HBASE-29160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HBASE-29160:
-----------------------------------
Labels: pull-request-available (was: )
> Cache result of getRegionNameAsString()
> ---------------------------------------
>
> Key: HBASE-29160
> URL: https://issues.apache.org/jira/browse/HBASE-29160
> Project: HBase
> Issue Type: Improvement
> Reporter: Charles Connell
> Assignee: Charles Connell
> Priority: Minor
> Labels: pull-request-available
> Attachments: slow-region-name-1.html, slow-region-name-2.html,
> slow-region-name-3.html
>
>
> I've noticed that tracing can add meaning 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 traces where {{getRegionNameAsString()}} occupies 0.5% - 2%
> CPU time.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)