bbeaudreault commented on PR #5072:
URL: https://github.com/apache/hbase/pull/5072#issuecomment-1455146118
> I removed all null checks, but to be honest, I'm not sure if there is any
corner case that I didn't think of
Just to be clear, I'm not against null checks. I'm against replacing:
```java
if (object != null) {
object.doSomething();
}
```
with
```java
Optional.ofNullable(object).ifPresent(Object::doSomething);
```
It's fine in simple code, but in hot code paths its an unnecessary object
allocation. You could keep the null checks in your PR if you want, they aren't
a problem. I just didnt want the unnecessary optional stuff in the specific
area.
> I don't quite understand why TableQueryMeterMetrics needs to have a
separate switch.
The TablequeryMeter stuff uses an codeahale metrics EWMA. This has caused
performance issues for some people in the past, so a config was added to
disable separately it. We have it disabled at my company, though have other
table metrics enabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]