I use the following code to start a start a job :
Class MyClass Extends (...)
{
ClassMethod Foo()
{
job $CLASSMETHOD("MyClass","MyMethod") //take forever depending hardware
}
ClassMethod MyMethod()
{
//do database related stuff
}
}
On local environment, calling Foo() is instantaneous (a few ms). On production/test servers (which have much better hardware than local) calling this function is slow and take between 200 ms to 800 ms. Obviously starting a new job with "job" command take lot of time on those environments.