Event handler

Hi

I was wondering which one is faster - technically

If i set the class alias inside eventhandler

[EventHandler(MFEventHandlerType.MFEventHandlerBeforeCheckInChanges, Class = "CD_ALIAS")]

public void MyEventHandler(EventHandlerEnvironment env)

{

}

or if i set a filter search and check myself inside an event handler?

public SearchConditionsJA TargetFilter;

Thank you

Parents
  • How are you then using the SearchConditionsJA in your code?  I suspect that the difference will be minimal, if any, at a practical level.

    For me there's one approach which is far more flexible, and that would be my justification for using the SearchConditionsJA aprpoach.

  • Hi Craig

    The search conditions is then used inside this event.

    The fact is that it has to be triggered by a save event, so i'm just wondering which one is faster?

    Using the class filter or searchconditionsJA?

    Yes, for the practical part it is better to use SeaechConditionsJA.

    Me and my colleague were wondering which one is faster? At the technical level

    How does the Class filter work?

    Does it still  check for every objects class that enters (probably yes), but is a bit faster then SearchConditionsJA?

    Thank you?

Reply
  • Hi Craig

    The search conditions is then used inside this event.

    The fact is that it has to be triggered by a save event, so i'm just wondering which one is faster?

    Using the class filter or searchconditionsJA?

    Yes, for the practical part it is better to use SeaechConditionsJA.

    Me and my colleague were wondering which one is faster? At the technical level

    How does the Class filter work?

    Does it still  check for every objects class that enters (probably yes), but is a bit faster then SearchConditionsJA?

    Thank you?

Children