As a part of troubleshooting, I run the same code without the Documentbuilder and with DocumentBuilder. The Lag comes only when I have DocumentBuilder. I used Diagnostic Tool to see whats happening in between controller return and when the control is reaching client side Javascript code on success method.
Program Output: The thread 0x54dc has exited with code0( 0X0)
Program Output: The thread 0x60ac has exited with code0( 0X0)
Program Output: The thread 0x1b88 has exited with code0( 0X0)
Program Output: The thread 0x3974 has exited with code0( 0X0)
The error keep getting logged for approx 20 sec