1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Event hits

Discussion in 'XenForo Development Discussions' started by wang, Dec 6, 2015.

  1. wang

    wang Well-Known Member

    What is the benefit on using them? It saves me time if I do not use them, because I can add all classes in a function and then define that function to Code Event Listeners in my admin panel. But if I use Event Hints, like i have noticed in some add ons, such as Resource Manager, then I have to define each function one by one to Code Event Listeners. Can someone explain to me the benefits of adding event hints in add ons vs not using them?
     
  2. NixFifty

    NixFifty Well-Known Member

    They're used to only call your event listeners on classes where they're actually required thus providing a performance boost, especially in the case of larger and busier forums.
     
    wang likes this.
  3. wang

    wang Well-Known Member

    Speed performance seems to be the benefit then. Thank you for your explanation sir.
     
    NixFifty likes this.

Share This Page