Coder Social home page Coder Social logo

Comments (15)

MemoryReload avatar MemoryReload commented on May 23, 2024

load是在执行期注册到容器中的,但是,比类的加载稍微早一点。__attribute其实是一种注解方式,是在编译阶段注册到容器中的。个人觉得,本质并无差别。可能,注解稍微效率高那么一点点吧。

from beehive.

MountainHill avatar MountainHill commented on May 23, 2024

@MemoryReload 只是两种写法的不同而已,对吗?我一同事说load注册有问题,说现在都没有人用load注册,所以我就问下是这样吗?

from beehive.

MemoryReload avatar MemoryReload commented on May 23, 2024

One good suggestion for you: reading the source code, if feeling curious about that. : )

from beehive.

MountainHill avatar MountainHill commented on May 23, 2024

@MemoryReload Actually I have read the source code at all.

from beehive.

MemoryReload avatar MemoryReload commented on May 23, 2024

So, I’m confused why you’re doing this.

from beehive.

MountainHill avatar MountainHill commented on May 23, 2024

Because I'm curious.I wonder if you ask question after you have read other open source framework.Maybe you don't.

from beehive.

MemoryReload avatar MemoryReload commented on May 23, 2024

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.

rjinxx avatar rjinxx commented on May 23, 2024

Just two options, no need to tell explicitly which one is more preferable...

from beehive.

MountainHill avatar MountainHill commented on May 23, 2024

@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.

MemoryReload avatar MemoryReload commented on May 23, 2024

@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.

MountainHill avatar MountainHill commented on May 23, 2024

@MemoryReload I get it.Thank you very much.

from beehive.

MountainHill avatar MountainHill commented on May 23, 2024

@MemoryReload Please close this issue.

from beehive.

MemoryReload avatar MemoryReload commented on May 23, 2024

@MountainHill Maybe, it's your responsibility to do that. You're the issuer.

from beehive.

JpacheGitHub avatar JpacheGitHub commented on May 23, 2024

应该是考虑到App的启动时间问题吧, 大量用load会拉长启动时间吧

from beehive.

d553296416 avatar d553296416 commented on May 23, 2024

你们绝了,中文聊着聊着切英语交流,目的是什么呢

from beehive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.