I am aware of the following methods for generating thread dumps in java:
The most performant option is likely to be the use of the ThreadMXBean.dumpAllThreads() API rather than requesting a text thread dump written to disk: http://docs.oracle.com/javase/7/docs/api/java/lang/management/ThreadMXBean.html#dumpAllThreads(boolean,%20boolean)
Of course, whether you can use that depends on whether you need a thread dump file, or just the data.