rizsotto / Bear

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

Intercept shall use SQLight instead of memory for the received events #343

Closed rizsotto closed 3 years ago

rizsotto commented 3 years ago

Currently the process lifetime events are arriving to intercept via gRPC and those events gets processed and stored in the memory. This hurts when compiling big projects.

Event table can have:

rizsotto commented 3 years ago

The intercept command has nearly constant memory allocation. (Allocation fragmentation is still there, but the new memory allocation rate is significantly less.) Here are the before and after pictures

intercept old intercept new

The citnames command still reads all command into memory before it starts the filtering, but the allocation is still smaller than the old version. It got significantly slower 15s from 1s in my measurement. That could be a subject to improve.

citnames old citnames new

rizsotto commented 3 years ago

contributes to #350