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.

Reply
  • 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.

Children
  • 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?

  • The class filter simply checks the class. The search conditions could check more. I'm not sure it's a valid thing to compare one to the other. 

    That said: if the conditions just contains the class filter then I expect them to be largely similar. 

  • Hi Craig.

    My colleague searches for milliseconds when doing some stuff through VAF. So this would be a matter of assembly at the end :)  I told him the same as you did - similar if only contains class as a filter. But he just wants to know this. Probably for no other reason but to see if he is right Slight smile

    I'll tell him to send his own question to support and stop wasting our time Slight smile

    Thank you Craig.

  • I'm not sure support will be able to assist. If he really wants to know the exact answer then maybe he could test it...?