Timers impacting performance

Version 1
    This document was generated from CDN thread

    Created by: Mark Alliban on 25-07-2012 09:06:39 AM
    I have heard rumours that say using timers eg. "timer start leg_timer 600 leg_incoming" can have serious performance impact when the number of calls is high.
    I can't find any hard evidence to back it up but one of the guys here is convcinced of it.
    Is there any truth to this? Should I avoid timers for performance reasons?

    Subject: RE: Timers impacting performance
    Replied by: Yaw-Ming Chen on 25-07-2012 11:23:38 AM
    If you start timer in the following way it might cause problem but if you don't do it in this way it should be fine. Also I would use timer start named_timer 600 timer_1 if I can.

    # State Machine
    set fsm(any_state,ev_disconnected) "act_Cleanup same_state"
    set fsm(OUTCALL_WAIT,ev_named_timer) "act_Setup same_state"
    set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone CALLACTIVE"
    set fsm(CALLDISCONNECT,ev_leg_timer) "act_Cleanup same_state"

    fsm define fsm OUTCALL_WAIT

    start_timer <--- start timer procedure