Okay some tips for making that a lot faster, stop updating GUI you dont have to put every key in the textarea and also forgot about that counter thing, this are 2mio calls(if you gen 1 mio keys) that make this soooo slow. 17seconds for 1000keys while a java program without any gui need 1 second for 1.2 mio keys.