mirror of
https://github.com/Dark98/SliceBeam.git
synced 2026-12-06 08:57:16 +00:00
Optimize boot time
This commit is contained in:
1 parent
6092f123b5
commit
662018834e
14 files changed
+337
-41
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package ru.ytkab0bp.slicebeam.boot;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import ru.ytkab0bp.slicebeam.SliceBeam;
|
||||
import ru.ytkab0bp.slicebeam.slic3r.Slic3rConfigWrapper;
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
public class LoadSlic3rConfigTask extends BootTask {
|
||||
public LoadSlic3rConfigTask() {
|
||||
super(() -> {
|
||||
File cfgFile = SliceBeam.getConfigFile();
|
||||
SliceBeam.getCurrentConfigFile().delete();
|
||||
if (cfgFile.exists()) {
|
||||
try {
|
||||
SliceBeam.CONFIG = new Slic3rConfigWrapper(cfgFile);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
onWorker();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user