There are many factors on which the preformance of InfoPath forms
rely.
Please take a look at the following reference link: http://msdn.microsoft.com/en-us/library/bb380251.aspx
It gives good information about improving form performance.
Be aware of exactly what your business logic does. For example,
onAfterChange can fire multiple times for a single edit. This might be one
of the solution for increaing the performance of your infopath form.