diff options
author | Simon Rettberg | 2022-03-21 17:22:16 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-03-21 17:22:16 +0100 |
commit | ad0788e8fbead90d1ab03ba1a5c83b00114cb3a0 (patch) | |
tree | af62b617fb6149afce16d417474abd49f373cbf9 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java | |
parent | [client] Cleanup chunk data lists when upload finished or is cancelled (diff) | |
download | tutor-module-ad0788e8fbead90d1ab03ba1a5c83b00114cb3a0.tar.gz tutor-module-ad0788e8fbead90d1ab03ba1a5c83b00114cb3a0.tar.xz tutor-module-ad0788e8fbead90d1ab03ba1a5c83b00114cb3a0.zip |
[client] Memory management; handle OOM when hashing, do not skip blocks
Try to free some references regarding transfers earlier, e.g. the hash
worker and list of hashes as soon as hashing is finished on upload, not
only when the upload is finished and the window is closed.
Properly delay hashing of blocks in OOM scenarios, and be more
conservative with the number of hash workers, i.e. take maximum JVM
memory into account.
Also, improve thread naming.
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java index ac8f80c1..1bcbaaf6 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java @@ -147,8 +147,11 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotific @Override protected void doCleanup() { + if (state != null) { + state.upload = null; + state = null; + } imageUploadPage = null; - state = null; } } |