toward faster reformat

reformat with import optimise takes a very long time if you set it
loose on a project of thousands  of files.

I noticed it is compute bound and uses only a single thread, using
only one of my six cores.

You could double the speed by using two threads, each handling half
the files.

What is even worse, is it is using the EDT thread, so the GUI can't
respond to requests to repaint.

see LinkedBlockingQueue and ThreadPoolExecutor
You could arrange any plugin that operates on a single file to be
optionally multithread with a configurable number of threads.
Roedy Green Canadian Mind Products
Students who hire or con others to do their homework are as foolish
as couch potatoes who hire others to go to the gym for them.

Please sign in to leave a comment.