Copilot commented on code in PR #16231:
URL: https://github.com/apache/dubbo/pull/16231#discussion_r3144632740
##########
dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java:
##########
@@ -999,6 +1032,22 @@ private Map<String, Class<?>> loadExtensionClasses()
throws InterruptedException
}
}
+ if (debugEnabled) {
+ Long costMillis = (System.nanoTime() - startNanos) / 1_000_000L;
Review Comment:
`costMillis` is declared as `Long`, which introduces unnecessary boxing in a
hot path when DEBUG is enabled. Prefer using the primitive `long` and let the
logger handle boxing only at the call site if needed.
```suggestion
long costMillis = (System.nanoTime() - startNanos) / 1_000_000L;
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]