Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sofa boot invoke question #1298

Open
yuanChina opened this issue Mar 18, 2024 · 4 comments
Open

sofa boot invoke question #1298

yuanChina opened this issue Mar 18, 2024 · 4 comments

Comments

@yuanChina
Copy link

ComponentInfo注册的时候为什么都是ReferenceComponent不是ServiceComponent,调用的时候getTarget用的type=service进行调用,找不到,只能每次都去遍历查性能很差.这个是什么原因

@HzjNeverStop
Copy link
Contributor

请详细描述下具体场景呢?例如哪行代码在什么场景下存在问题

@yuanChina
Copy link
Author

问题是sofa boot 调用服务的时候 每次都会执行getBizInOrder 我们在想怎么可以绕过, 于是看到如果getTarget有返回值就可以绕过,但是这个getTarget的时候 需要根据type=service进行查找,但实际宿主注册的服务都是type=reference

@HzjNeverStop
Copy link
Contributor

问题是sofa boot 调用服务的时候 每次都会执行getBizInOrder 我们在想怎么可以绕过, 于是看到如果getTarget有返回值就可以绕过,但是这个getTarget的时候 需要根据type=service进行查找,但实际宿主注册的服务都是type=reference

发起 JVM 调用注册的 type=reference,因此,你提供这个服务的地方注册的应该是 type=service 的组件

@yuanChina
Copy link
Author

是的 那这种不一致?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants