Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update chen for improved performance with header analysis #88

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

prabhu
Copy link
Contributor

@prabhu prabhu commented Nov 1, 2023

-l h must be a bit faster now. This is achieved by:

  • Not searching for includePaths in header mode. This would result in header files being represented as relative files in usage slices.
{
      "code" : "#include<sys/socket.h>",
      "fullName" : "sys/socket.h",
      "signature" : "sys/socket.h",
      "fileName" : "",
      "lineNumber" : null,
      "columnNumber" : null,
      "usages" : [
      ]
    },

instead of

{
      "code" : "",
      "fullName" : "/usr/include/asm-generic/socket.h:12:12:SO_REUSEADDR:0",
      "signature" : "",
      "fileName" : "/usr/include/asm-generic/socket.h",
      "lineNumber" : 12,
      "columnNumber" : null,
      "usages" : [

If you prefer the depth and detail shown in (2), use -l c.

  • Ignoring several nodes in the AST, such as control flow, expressions, and several operators.

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
…n exception in CI

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
@prabhu
Copy link
Contributor Author

prabhu commented Nov 2, 2023

Creating a usage slice using -l h is now finishing in GitHub actions in around an hour. With 32GB heap memory, it is finishing in under 15 minutes.

@prabhu prabhu merged commit b2fa168 into main Nov 2, 2023
24 of 25 checks passed
@prabhu prabhu deleted the feature/tune-cpp branch November 2, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant