Menu

performance bottle necks, skip analysis

2023-03-13
2023-03-13
  • Daniel Marjamäki

    Some users wants to have fast analysis even if there are limitations.
    Other users wants to have all analysis even if it could take some extra hours.

    I feel we should try to satisfy both these groups of users.

    One performance bottle neck I know about is that when a function has lots of conditional scopes then the number of execution paths can explode, and then it takes a lot of time to perform value flow analysis. An example of this scenario is our cli/cmdlineparser.cpp file; and that takes a very long time for cppcheck to analyse.

    I suggest that we skip all non-trivial valueflow analysis in functions that have many ifs. If it's skipped, I want that some message is shown: non trivial valueflow analysis is skipped due to too many execution paths. If you want full analysis use option <some option>, if you want fast analysis you can suppress this message with --suppress=....

    The message should in theory be information severity. But it's unfortunate if analysis is skipped and users don't see it. Would it be ugly if it's written no matter if --enable=information is used or not?

    Do you have some opinions?

    Do you know some other bottle necks, that cause analysis time to explode, other than "many conditional scopes"...?

     

    Last edit: Daniel Marjamäki 2023-03-13
  • CHR

    CHR - 2023-03-13

    E.g. this issue is related to SymbolDatabase instead of ValueFlow: https://trac.cppcheck.net/ticket/10192

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.