Jump to content
  • 0

Is the "OnPCLoadMapEvent" really THAT impactful on performance? If so, why?


INREM

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  10
  • Reputation:   0
  • Joined:  05/27/21
  • Last Seen:  

Not sure whether this is ultimately more of a "source" question or a "script" question, but here we go...

The documentation for OnPCMapLoadEvent implies that it's restricted to triggering only on "flagged" maps because otherwise it would have a terrible impact on the performance of well-trafficked servers:

 
   The fact that this label requires a
  mapflag for it to work is because, otherwise, it'd be server-wide and trigger
  every time a player would change maps. Imagine the server load with 1,000 players
  (oh the pain...)

Notably, there's no similar warning for OnNPCKIllEvent, which when set seems apt to trigger hundreds or thousands of times more often than OnPCMapLoadEvent would.  Why is OnPCMapLoadEvent singled out like this?  Is there a special concern about it bottlenecking a particular execution thread?

The crux of my interest is that I would ideally like to check for the presence or absence of a particular custom SC status when players change maps.  I could do without, but it will make the implementation of a certain bonus feature a little more janky. 

I'm willing to drill down into the source code to patch this in directly if it would help, but I would like to understand the basis of the concern about overusing OnPCMapLoadEvent - assuming it's well-founded.  Thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   74
  • Joined:  12/04/14
  • Last Seen:  

The latest rAthena git already have that.

But it's yaml ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...