Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2019 12 14 multithreading #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

t-ja
Copy link

@t-ja t-ja commented Dec 14, 2019

Hi,
this is a pull request which adds multithreading support to JPEGOptimizer. It detects the number of logical CPUs and offers an additional dropdown in the GUI for selecting up to this number threads for parallel optimizing. Also, I ran SpotBugs for finding possible stability issues and refactored some code to make use of the Java "try-with-resources" statement for reliably closing file resources.
I increased the with of the label column from 75 to 125 pixels because labels were not fully displayed on my machine. I tested the code with Java 8, but I think Java 7 will also be able to run it.

t-ja and others added 7 commits December 14, 2019 11:44
executor with the selected number of Threads.
Futures and call their .get() methods for showing the progress bar and
for calculating the gain.
to 100 px, so that the label texts fit ino the column.
"try-with-resources" statements so that files are reliably closed.
Synchronized logging to log panel. Added number of threads to ini file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant