Have you checked the java traces and logs. It does not appears related to Optimization, improving transaction run time from few seconds to milliseconds seems Optimization but not from hours.
Observe logs at start and finish of transaction and see what additional information is there.
Answer to below may point you to right direction.
MII running very high frequency schedule jobs with long processing times?
All MII applications are running slow ?
Also check if you need compatible patches on Netweaver: 7.4
-Ram Upadhayay