This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-21
Channels
- # announcements (12)
- # architecture (26)
- # beginners (165)
- # biff (19)
- # calva (25)
- # circleci (2)
- # clj-kondo (25)
- # clojure (70)
- # clojure-dev (17)
- # clojure-europe (37)
- # clojure-nl (1)
- # clojure-norway (22)
- # clojure-spec (10)
- # clojure-sweden (1)
- # clojure-uk (24)
- # clojurescript (10)
- # clr (9)
- # cursive (17)
- # data-science (2)
- # datahike (1)
- # deps-new (1)
- # dev-tooling (3)
- # emacs (3)
- # events (7)
- # helix (10)
- # honeysql (1)
- # hugsql (3)
- # humbleui (3)
- # hyperfiddle (30)
- # introduce-yourself (3)
- # jobs (1)
- # malli (4)
- # music (1)
- # off-topic (3)
- # pathom (3)
- # polylith (6)
- # portal (7)
- # re-frame (16)
- # reitit (3)
- # releases (3)
- # remote-jobs (1)
- # shadow-cljs (23)
- # xtdb (14)
Shadow-CLJS: 2.25.5
MacOS Ventura
Recently I have started facing issues during compilation. I ran watch command with --verbose
flag. Here’s the console output:
<- Cache write: com/vadelabs/studio/client/pages/workspace/plans.cljs (9598 ms)
<- Compile CLJS: com/vadelabs/studio/client/pages/project/playground.cljs (15550 ms)
-> Cache write: com/vadelabs/studio/client/pages/project/playground.cljs
<- Compile CLJS: com/vadelabs/studio/client/pages/project.cljs (16470 ms)
-> Cache write: com/vadelabs/studio/client/pages/project.cljs
<- Cache write: com/vadelabs/studio/client/pages/workspace/billing.cljs (31370 ms)
-> Cache read: com/vadelabs/studio/client.cljs
<- Compile CLJS: com/vadelabs/studio/client/ui.cljs (112930 ms)
<- Cache write: com/vadelabs/studio/client/pages/workspace/setting.cljs (126621 ms)
<- Cache write: com/vadelabs/studio/client/components/card.cljs (183913 ms)
<- Cache read: com/vadelabs/studio/client.cljs (389796 ms)
-> Compile CLJS: com/vadelabs/studio/client.cljs
<- Cache write: com/vadelabs/studio/client/pages/workspace/profile.cljs (511586 ms)
<- Cache write: com/vadelabs/studio/client/pages/workspace/templates.cljs (679704 ms)
These files were compiling pretty fast around a month ago. Wondering what could be the possible reason for Cache Write
to take so much time?compile also takes super long. this must be something hardware related. never seen times like those.
Disk is fine:
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s1s1 932Gi 8.5Gi 470Gi 2% 356050 4291076982 0% /
I am trying to trace back the changes and see if I could get to the root cause for this.I am just wondering where to look for debugging these kind of issues. For sure it’s my environment… Whenever I am running shadow-cljs - the java process CPU usage spikes to 200 - 300 % range. Takes up around 3GB of RAM.
it could still be the disk though. check the system information for smart errors or so
I guess it could be something if you added some kind of profiler/inspection tool that inspects every var and does some logging or whatever?
my disk of my mac mini died a couple months ago, it got seriously slow like this too before completely dying
Let me try different mac - to validate this hypothesis. Thanks a lot.
Phew! I think I was able to resolve it. So here’s the stupid thing I was doing that led to this: I have written a side-effecting macro - That macro updates the global atom whenever it is called. Based on the configuration stored in the atom - I generate CSS styles. I wrote a code snippet to watch the atom - and write the CSS file whenever the atom watch saw any changes. Things were working fine till the usage of the macro was lower - But as we started using it more and more, the compile time kept increasing. I don’t understand about atom watcher enough to explain this behavior. But we are back to previous compilation time when I removed the atom watch logic and moved it to shadow-cljs build hooks.