Fork me on GitHub

I'm working on a very big project, and figwheel is understandably getting slower. The problem is, sometimes it feels like it actually does more harm than good - especially when I do changes to a .cljc file, my browser tab completely freezes. While refreshing tabs is not something I want to go back to after experiencing the beauty that is figwheel, I'd certainly prefer it to going to the task manager and killing a tab.


I'm wondering whether there's some figwheel configurations we should do?


@kauko: :reload-clj-files false


that will do it


I may make that the default soon


What will that do exactly? If I change a .cljc file, I'll have to compile and refresh myself?


nope, it just prevents figwheel from autoloading the namespace into the clojure process. The file will still be compiled by the ClojureScript compiler


:recompile-dependents false is a good one as well


add those two and you will be flying again


Wait, why does figwheel care about .clj files?


its for when you want to work on macros live. So clj files in the cljs-build :source-paths get auto loaded


clj and cljc


Cool beans 🙂 So if I set :recompile-dependents false, and :reload-clj-files false, how exactly does it affect my worklow? There's a drawback, otherwise this would be the default, right?


:reload-clj-files false - you won't be able to do cljs macro work


:recompile-dependents false, turns off a safety feature of the compiler that recompiles all dependents of a changed file... It increases compile time if you are working on a namespace deep in a dependency tree, but in my experience I haven't seen any problems with turning it off


and things really fly when you do


there are also compile time things that slow you down like core.async, and core.match, or runtime things, that might be in your code, that get loaded over and over again


@bhauman: Given the amount of work you're doing on error messages, do you think it would be doable to pop up an info message when either :reload-clj-files or :recompile-dependents are false and a file changes such that you could assume the user wanted them to be set to true? Might reduce the drawbacks of changing the defaults to get the best of both worlds. This is all based on the assumption that the time taken is for operations outside of understanding that there was a change of some sort to the files, of course.


wondering if/when figwheel would support latest clj(s) versions so cljs can use cljs.spec. [org.clojure/clojurescript "1.9.36"] would be cool 🙂