2020-06-28 10:46:37,122 - dune.generator.builder - INFO - Loading HierarchicalGrid
each time a module is loaded. This line is printed before the module is compiled but it is printed independent of compilation actually being required. So it can become a bit verbose at times. All of this is in the Builder (builder.py). I've tried different approaches for refining this but haven't really found anything I like.
I don't need to turn on a switch to get this (some) output. Compilation can take several minutes, so IMO something like Running JIT compiler creating bindings for HierachicalGrid. This may take several minutes... is appropriate (similar to what FEniCS does for the function spaces IIRC)
Rather have a possibility to optionally turn off the message (not sure if this is needed)
The message should be only printed if something is actually being compiled
Ideally the possibility to group different things, for the case that some class always also leads to the compilation of some other class that is needed to use the first class, print only one message.
This is just a wish list to document this issue. I can have a look the next time I have work with Python bindings and the generator.
I would agree with all of these points. I don't really know how to do the third point. Number two is of course possible. Concerning the first point:
I should perhaps add that the logger I mentioned above was introduced also for debugig purposes where it is can provide information on where one is in the execution of the script. Also it print a time stamp so one gets a feeling for bottlenecks.
That said, I also looked into the fenics type message. I guess that would require to first do some dry run of cmake to see if compilation is required and if that returns affirmative to print the message and carry out the actual compilation. How one would distinguish if the compilation takes long (and what long means) is again not clear to me.