GitHub issue #59 - try to accommodate larger libraries without limiting heap size

pull/62/head
Zlatin Balevsky 2021-06-08 15:54:51 +01:00
parent bcc94abadd
commit 94a78bfa4e
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 5 additions and 2 deletions

View File

@ -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)
}

View File

@ -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",