Comments (15)
load是在执行期注册到容器中的,但是,比类的加载稍微早一点。__attribute其实是一种注解方式,是在编译阶段注册到容器中的。个人觉得,本质并无差别。可能,注解稍微效率高那么一点点吧。
from beehive.
@MemoryReload 只是两种写法的不同而已,对吗?我一同事说load注册有问题,说现在都没有人用load注册,所以我就问下是这样吗?
from beehive.
One good suggestion for you: reading the source code, if feeling curious about that. : )
from beehive.
@MemoryReload Actually I have read the source code at all.
from beehive.
So, I’m confused why you’re doing this.
from beehive.
Because I'm curious.I wonder if you ask question after you have read other open source framework.Maybe you don't.
from beehive.
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 load
strategy is error-prone, just test it and give your error reproduction as an issue. Sincerely sorry to bother you and happy Children's Day. : )
from beehive.
Just two options, no need to tell explicitly which one is more preferable...
from beehive.
@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.
Sincerely sorry to bother you and happy Children's Day. : )
from beehive.
@MountainHill Well, in my opinion, his words are not reasonable. As I know, There's no problem when using load
strategy to register a service. But maybe my test is not robust enough. And after all, That's all up to you to make your own decision.
from beehive.
@MemoryReload I get it.Thank you very much.
from beehive.
@MemoryReload Please close this issue.
from beehive.
@MountainHill Maybe, it's your responsibility to do that. You're the issuer.
from beehive.
应该是考虑到App的启动时间问题吧, 大量用load会拉长启动时间吧
from beehive.
你们绝了,中文聊着聊着切英语交流,目的是什么呢
from beehive.
Related Issues (20)
- 发现BHRouter中有多处逻辑BUG
- double-free Crash信息 HOT 1
- 为何独缺application:didFinishLaunchingWithOptions事件呢?
- 这个库swift是不能使用的。如果要用,自己+生命周期的处理。
- 注解造成的内存泄漏 HOT 2
- 推送收不到的奇怪问题 HOT 3
- 字典多线程安全问题 HOT 1
- 对于原来就是一个单例的类,如何保证这个声明service的对象还是唯一的
- 希望作者能完善一下BHRouter的Demo!!! HOT 5
- 一个VC对应一个一个Protocol
- moudle里的modInit有时候不会执行 不知道是否是注册失败 HOT 3
- 希望Demo能够补充一下BHRouter的用法 HOT 2
- BHRouter canOpenURL 校验时错误
- msgbus Bee
- 建议在`BHServiceManager.h` 中把获取类名的方法也给暴露出来;而 createService 只提供返回了实体对象。
- BeeHive的原理大概是这样子的
- @BeeHiveService 前面的@ 可以理解调用宏定义吗 HOT 4
- BHAnnotation中dyld_callback会被多次调用 HOT 1
- 请问项目还在维护吗?以后会兼容swift吗? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beehive.