rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.64k stars 306 forks source link

'--append' kills my build performance #532

Open Spongman opened 1 year ago

Spongman commented 1 year ago

I'm using bear --append and it's killing my build even when no compilation actually occurs (the project is already fully build). it works fine, it's just really slow.

without bear:

$ time make -sj7

real    0m3.750s
user    0m6.618s
sys     0m0.882s

with bear:

$ time ~/Bear/build/stage/bin/bear --append -- make -sj7

real    4m6.312s
user    0m32.840s
sys     0m16.986s

the project is a tree of makefiles running various shell/perl commands. again, no actual compilation is done here because the tree is fully built.

my compile_commands.events.json file is 8MB.

Environment:

rizsotto commented 1 year ago

Thanks for the report. Will try to reproduce it.

In the meanwhile, if there is no secret in there, could you run Bear with verbose flag? That would already display some timing information to start with.