Fork me on GitHub
#boot
<
2020-06-14
>
Daniel Östling23:06:37

When boot build target -d target is several times slower than "normal"/expected on macOS, what's the most common things people investigate? Does having 10GB test data in project directory impact something like that? I'm taking a simple measurement of build time now, but it's several minutes, whereas lein uberjar took 15 seconds to complete. I'm obviously doing something wrong 🙂

Daniel Östling23:06:52

$ /usr/bin/time boot build target -d target
Compiling 1/1 test-proj.core...
Writing pom.xml and pom.properties...
Adding uberjar entries...
Writing test-proj-0.1.0.jar...
Writing target dir(s)...
     1632.47 real        40.66 user       364.85 sys

Daniel Östling00:06:20

$ lein clean && /usr/bin/time lein uberjar
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Compiling test-proj.core
Created /<redacted path>/test-proj/target/uberjar/test-proj-0.1.0-SNAPSHOT.jar
Created /<redacted path>/test-proj/target/uberjar/test-proj-0.1.0-SNAPSHOT-standalone.jar
       15.32 real        27.59 user         5.09 sys

flyboarder16:06:25

10GB in your project? OMG that would probably murder the hard drive, boot tasks copy the project dir to their own temp folder, this could result in huge hard drive usage

flyboarder16:06:22

you should probably break up the project into smaller modules

flyboarder16:06:54

unless the test data is something like a database, then you just need to filter the fileset to remove it

Daniel Östling08:06:45

Thanks, but I tested this without having the test data in the project base dir.

Daniel Östling08:06:48

Additionally, target dir is ~23 MB so I don't think it's copying those 10GB test data.

Daniel Östling08:06:45

Unless it's copying and discarding of course. This is on nvme drives, so it takes ~20s to copy that data.