-
Notifications
You must be signed in to change notification settings - Fork 781
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
方法注册是在load中好呢还是使用BeeHiveService(servicename,impl)好呢?两者有何区别 #120
Comments
load是在执行期注册到容器中的,但是,比类的加载稍微早一点。__attribute其实是一种注解方式,是在编译阶段注册到容器中的。个人觉得,本质并无差别。可能,注解稍微效率高那么一点点吧。 |
@MemoryReload 只是两种写法的不同而已,对吗?我一同事说load注册有问题,说现在都没有人用load注册,所以我就问下是这样吗? |
One good suggestion for you: reading the source code, if feeling curious about that. : ) |
@MemoryReload Actually I have read the source code at all. |
So, I’m confused why you’re doing this. |
Because I'm curious.I wonder if you ask question after you have read other open source framework.Maybe you don't. |
I'm not meaning to be offensive. But I have to tell you that I think your question is a little bit meaningless since you've read the source code. The differences between two strategies are obvious. If you think the |
Just two options, no need to tell explicitly which one is more preferable... |
@MemoryReload I know the difference.I have this question because my workmate came from AliBaba.And he says in ALiBaba not use load to register service. |
@MountainHill Well, in my opinion, his words are not reasonable. As I know, There's no problem when using |
@MemoryReload I get it.Thank you very much. |
@MemoryReload Please close this issue. |
@MountainHill Maybe, it's your responsibility to do that. You're the issuer. |
应该是考虑到App的启动时间问题吧, 大量用load会拉长启动时间吧 |
你们绝了,中文聊着聊着切英语交流,目的是什么呢 |
服务的注册在beehive中有两种方式(不讨论plist),一种是在
+(void)load { }
另一种是用(使用__attribute形式)
BeeHiveService(servicename,impl)
这两种有何区别呢?
The text was updated successfully, but these errors were encountered: