Clang.jl
Clang.jl copied to clipboard
`GeneralPrinter` is slow
It takes almost 1min on my m1 machine to generate only 7k loc: https://github.com/Gnimuc/ClangCompiler.jl/blob/main/lib/17/LibClangEx.jl
whereas, the codegen process only takes seconds...
Anecdotally, I don't think it's ever taken that long to generate the CImGui.jl bindings, which are 14.5k LOC :thinking: Is it just TTFX? Or the printing itself really being slow?
I didn't profile but it stuck in "[GeneralPrinter]: print to ..."
The LOC of the generated file may not be a good metric because the number of nodes/symbols can be way larger.
I had something similar trying to wrap the win32 API, it took very long but only when I had a lot of entries in printer_blacklist. I then realized it was mostly spent compiling regular expressions, which should be fixed in #518. Could it be what made the printing case so slow here?