You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wxbty (via GitHub)" <gi...@apache.org> on 2023/07/15 10:28:20 UTC
[GitHub] [dubbo] wxbty commented on a diff in pull request #12730: Optimize performance for some basic APIs
wxbty commented on code in PR #12730:
URL: https://github.com/apache/dubbo/pull/12730#discussion_r1264381641
##########
dubbo-common/src/main/java/org/apache/dubbo/common/beans/factory/ScopeBeanFactory.java:
##########
@@ -53,7 +54,9 @@ public class ScopeBeanFactory {
private final List<BeanInfo> registeredBeanInfos = new CopyOnWriteArrayList<>();
private InstantiationStrategy instantiationStrategy;
private final AtomicBoolean destroyed = new AtomicBoolean();
- private List<Class<?>> registeredClasses = new ArrayList<>();
+ private final List<Class<?>> registeredClasses = new ArrayList<>();
+
+ private final Map<Class<?>, Object> registeredCacheBeanMap = new ConcurrentHashMap<>(64);
Review Comment:
Only beans without names are cached here. If most beans have no names, is this enough? Maybe changing the name of the map to NoNameBeanMap is more appropriate
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org