tools-build

dazld 2025-09-12T08:53:52.889789Z

The tools build uber task can be a little slow - looking at the code, it’s highly sequential, handling conflicts one by one. However, I wonder if there might be some way to pre-process and find conflicts ahead of time, allowing non-conflicting files to be processed in parallel? Is this even a good idea?

Darin Douglass 2025-09-12T14:10:32.431489Z

the most common slowdown i've seen is having a security app on your machine that scans files as they're written. for me, building with that app enabled takes minimum 30s. without it, like 5s

emccue 2025-09-18T13:37:13.247359Z

sheer shock and awe: you have 110k files in your jar?

dazld 2025-09-18T13:37:36.276069Z

we do! it’s a big project

dazld 2025-09-18T13:38:15.897059Z

think it’s not that unusual for large clj projects?

dazld 2025-09-18T13:38:50.068809Z

I’ve trimmed almost all the fat I can from this too

emccue 2025-09-18T13:38:53.947979Z

i guess i'll check my old prod app. should build that every once and awhile anyways

emccue 2025-09-18T13:39:18.509489Z

but okay to start: maybe just copy the entire uberjar namespace into your project and lets tweak from there

emccue 2025-09-18T13:39:43.467539Z

then once you are done tweaking and profiling see if there is anything worth merging back up

dazld 2025-09-18T13:40:08.922749Z

I stared a fork already - but it had some odd bugs, and was pulling it in as a git dep https://github.com/dazld/tools.build/tree/parallel-uber

emccue 2025-09-18T13:40:45.331409Z

instead of forking the library itself i'd just copy that one file and change the namespace to your.company.tools.build.tasks.uber

dazld 2025-09-18T13:40:58.213559Z

this is also pretty easy

dazld 2025-09-18T13:41:06.959879Z

but yep, could do that too

emccue 2025-09-18T13:41:19.952959Z

since i'd say 50/50 the conclusion is going to be "yeah you get your own special snowflake"

dazld 2025-09-18T13:42:18.143959Z

tbh - even when the parallel build was up, even if buggy, it wasn’t that much faster

dazld 2025-09-18T13:42:23.879989Z

but I do think there’s opportunity here

dazld 2025-09-13T07:05:45.042389Z

fortunately, that’s not an issue for us on CI or locally (afaik) - we have some 110k files in our JAR, so it’s not surprising it takes some time to build I suppose.

> jar tf uber.jar | wc -l 
109901
but - I can see that only about ~5k of those paths were conflicting, so, forcing the possibly slower sequential build for over 95% of the files to package feels like there might be an opportunity to speed it up a little.

dazld 2025-09-13T07:06:28.552709Z

it all adds up!