I have a config file that I include in all of my other files. They themselves get use<>d in my main file. I noticed that any modules in my config file get compiled over and over again. Is there a way to avoid this?
No, so I restructured my code to only have object definitions in the include file and uses of the files with modules. Those get cached and only compiled once.
e.g. I might include screws.scad that has a list of screw definitions (lists) and it uses screw.scad to pull in all the related modules and functions.
The fact that screws.scad is included lots of times means that the lists are defined over and over again but that is relatively fast. If it became a problem I suppose I could wrap all my objects in functions, so I would then just use screws.scad and it would all be cached.
I had to improve the way OpenSCAD checked the dates of the cached files to prevent it slowing down with the square of the number of used files.