Git blame view doesn't work
When opening git blame view on the GUI, the CPU seems to be working but there is no result.
If I remember correctly this issue was only faced with projects/files with a long history.
Based on the code I think the source of the issue will be, that GitServiceHandler::getBlameInfo creates the blame object through the libgit2 API, but then loads the metadata for all hunks (see line 266):
https://github.com/Ericsson/CodeCompass/blob/ff4b4cf72998b1032aed6301f9b8f2ab7cbc3933/plugins/git/service/src/gitservice.cpp#L244-L314
Then the full history of the file is sent to the webclient. In the browser it seems like the blame history is loaded dynamically upon scrolling, but this is just a JavaScript effect on the client side, once the blame view is loaded for a file, there is no further communication with the webserver. (I have tested it.)
That's why it is so slow for files/projects with a large history, like LLVM.
@bruntib @mcserep Does anyone remember in which particular file we had this issue? I remember it was in LLVM, but not the exact file. However, I could reproduce the problem for <llvm_root>/llvm/tools/gold/gold-plugin.cpp, to add an example. The GitService returned a (failed) net::ERR_EMPTY_RESPONSE error for this file's git blame.
@bruntib @mcserep Does anyone remember in which particular file we had this issue? I remember it was in LLVM, but not the exact file. However, I could reproduce the problem for <llvm_root>/llvm/tools/gold/gold-plugin.cpp, to add an example. The GitService returned a (failed) net::ERR_EMPTY_RESPONSE error for this file's git blame.
@intjftw Does executing blame with the Git CLI succeeds for this file? (To verify that the issue is not with git/libgit itself.)
@mcserep Yes, it executes in less than 1 minute.
An example page where the git/blame takes timeout http://poirot.codechecker.gic.ericsson.se:8301/#wsid=ml66_proj&fid=17940882928923629289&select=40|9|53|14¢er=text
Something is terribly wrong on the site linked by @zporky, potentially not really related to the Git plugin. The database behind that server is corrupted. I am clicking around, and constantly getting errors in JS like this:
11:32:29.318 Uncaught
Object { message: "TException - service has thrown: InvalidId(msg=Invalid CppAstNode ID, fid=<null>, nodeid=0)", code: 0, stack: "" }
codemirror.js:3924:29
What is the status of this bug report @intjftw ? Is it still present or has it been resolved?
I reevaluated this with the current Gershwin version, and fetching the blame info for files with a long history (e.g. CREDITS.TXT for the LLVM project) still takes a very long time.