I am in the process of developing a java plugin that grabs the image files of a directory, performs colour deconvolution on each image and measures area and mean intensity using thresholding.
Intially, I did a script where a GUI was not required to write the different methods and make them work. I concluded that performance was good,I implemented this into a Swing GUI with a few buttons for user inputs. However, adding the GUI significantly slowed down the speed of the plugin from ~0.5s per image to ~5s. I then tried to build a AWT-based GUI with the same result.
Does anyone have an idea of why this is and how I can fix the problem?