Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy
https://codechecker.readthedocs.io
Apache License 2.0
2.23k stars 373 forks source link

[web] Individual Bug Path Events should not be stored as separate records #4268

Open vodorok opened 3 months ago

vodorok commented 3 months ago

There is no use case to look up the individual Bug Path Events in the server, but BPE-s have a dedicated table and are stored in a structured form. It would be enough to store the report paths in a text blob in SQL database because it is enough to render the BPE-s on the fly for a given report. This way, when the results are stored, we would not need to parse the report paths part of the .plist files. We would not need to store the events one-by-one in a database table.

With this, we would gain storage speed at storage and report removal time too.

jstevens176 commented 2 months ago

I actually use this functionality in a fork that I've made where I want the source line instead of the sync line of a bug. Storing it as a text blob would turn that from a simple db call to a bunch of string manipulation. As such I would hesitate to agree with the statement "There is no use case to look up the individual Bug Path Events in the server".

whisperity commented 2 months ago

@jstevens176 I believe the API would still return the same data structures, let's say the "expanded" format, but it won't be acquired through hundreds of JOINs for each Report query.