Quote from FutureScalper:
Well, if you're TWS as the mediator, and not FIX then I could suggest you run TWS under the Java Server VM for higher performance. Also, if you're on Windows, adjust the scheduling so your client and TWS have equal priority. I imagine you're well beyond these details, but just fyi.
Just in case you're interested, here's a .bat file to run TWS under the Server VM in Windoze.
REM Works ONLY if Java Server VM is installed, which can be obtained from the JDK
c:\WINDOWS\system32\java.exe -server -Dsun.java2d.noddraw=true -Xbatch -XX:+UseConcMarkSweepGC -XX:+ForceTimeHighResolution -XX:ThreadStackSize=256 -XX:CompileThreshold=250 -XX:+AggressiveOpts -XX:CICompilerCount=2 -XX:+UseBiasedLocking -XX:+CMSIncrementalMode -XX:MaxGCPauseMillis=75 -XX:+RelaxAccessControlCheck -XX:-TieredCompilation -XX:MaxInlineSize=128000 -XX:-DontCompileHugeMethods -XX:+UseFastAccessorMethods -Xss192k -Xms300m -Xmx300m -Xnoclassgc -XX:+DisableExplicitGC -XX:ThreadStackSize=128 -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -cp jts.jar;pluginsupport.jar;hsqldb.jar;jcommon-1.0.12.jar;jfreechart-1.0.9.jar;jhall.jar;other.jar;riskfeed.jar;rss.jar jclient/LoginFrame \jts
Java is much faster than most people think !!