KDAB / codebrowser

Woboq CodeBrowser
http://woboq.com/codebrowser.html
Other
1.1k stars 161 forks source link

ccache/sccache usage together with codebrowser #111

Closed Felixoid closed 12 months ago

Felixoid commented 1 year ago

Hello, we use the codebrowser in our CI.

I wonder if there's an option to increase the speed by using something like *ccache?

What I've tried, and it didn't help, is trying to change the compile_commands.json like this sed -i 's|^ "command": "/usr/bin/clang| "command": "/usr/bin/sccache /usr/bin/clang|' compile_commands.json, but it didn't help so far.

Waqar144 commented 1 year ago

Yes, stuff like that won't work.

Felixoid commented 1 year ago

Ok, but can we somehow preserve the work between the runs? I mean, now the full docs generating costs around 3-4 hours. Sounds very long. And if some docs don't change between running, could we save time by not processing them over and over again?

Waqar144 commented 1 year ago

There is no direct way. You can try doing something like:

Above should be easy and scriptable. But I am not sure if this will give 100% correct output always.

Felixoid commented 1 year ago

yeah, that doesn't really look promising.. We must then to parse commands' json, I guess, and recombine the build tree..

Waqar144 commented 1 year ago

You can try to use this script to speed up generation https://github.com/KDAB/codebrowser/blob/master/scripts/runner.py

It tries to process multiple files at once so the speedup can be quite big.