mirror of https://github.com/zlatinb/muwire
GitHub issue #59 - try to accommodate larger libraries without limiting heap size
parent
bcc94abadd
commit
94a78bfa4e
|
@ -39,7 +39,8 @@ class HasherService {
|
|||
private final BlockingQueue<Runnable> runnables = new LinkedBlockingQueue<>()
|
||||
Executor throttlerExecutor
|
||||
Executor executor
|
||||
private int currentHashes
|
||||
private int currentHashes
|
||||
private long totalHashes
|
||||
|
||||
HasherService(EventBus eventBus, FileManager fileManager, MuWireSettings settings) {
|
||||
this.eventBus = eventBus
|
||||
|
@ -88,6 +89,8 @@ class HasherService {
|
|||
while(currentHashes >= settings.hashingCores)
|
||||
wait(10)
|
||||
currentHashes++
|
||||
if (++totalHashes % TARGET_Q_SIZE == 0)
|
||||
System.gc()
|
||||
executor.execute({processFile(f)} as Runnable)
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ run {
|
|||
|
||||
startScripts.doFirst {
|
||||
application.applicationDefaultJvmArgs = ["-Djava.util.logging.config.file=logging.properties",
|
||||
"-Xmx256M",
|
||||
"-Xms256M",
|
||||
"-XX:+HeapDumpOnOutOfMemoryError",
|
||||
"-XX:+ExitOnOutOfMemoryError",
|
||||
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
|
||||
|
|
Loading…
Reference in New Issue