Efficient text to binary conversion in Java
Sure, you may speed up your code execution. But the core problem remains: Inresponsive UI executing a long running task.

If you expect the user wait for completion a long running task you should consider UI supported synchronized mechanisms to adress it.

Asynchronous execution is mentioned here:

http://docs.oracle.com/javafx/2/threads/jfxpub-threads.htm

The idea is: Execute your code in a separate thread and synchronize results by publishing them through the Java FX thread.