Jump to content

Whats the most efficient?


aintaro

Recommended Posts

That only changes the source of event that is triggered, so in first case it would be resource's root element, while in the other it would be regular root element (containing all other elements). I don't think this affects the efficiency at all, unless you are trying to parse some element as source, then it depends on what do you put as source.

Link to comment
That only changes the source of event that is triggered, so in first case it would be resource's root element, while in the other it would be regular root element (containing all other elements). I don't think this affects the efficiency at all, unless you are trying to parse some element as source, then it depends on what do you put as source.

Root executes faster than getrootelement () so thats why I was wondering if it could make a difference

Link to comment

Tre.png

I think that the higher up in element tree the element you are attaching with is, the slower it will take to trigger the event, but only if you are triggering with a child of the attached element. Like if you attach event to root, but trigger the event with a player as source element.

Depending on how mta devs have implemented it, it may also take longer to trigger if you have many events that are attached to the same element than attaching to an element that doesn't have many events attached to it.

But anways, resourceRoot should be more efficient than root. Though the difference in performance may be non-existent.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...