Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8090

Regular expression in cppcodemarker.cpp slows down qdoc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.7.0
    • Documentation
    • None

    Description

      Commit c5bfbe27 (from Fri Oct 16 2009) contains a regular expression of yours that appears to make qdoc take about 8 times as long to run than it did before. Maybe this is due to the complexity of the expression, or perhaps it's due to a regression in the regexp engine. In either case, I'd appreciate it if you can take a look at it and maybe simplify it, otherwise I'll have to hack at it.

      Warwick wrote:

      > The problem, I strongly suspect is that the "[^&]" is too greedy. It should be "[^&\n]". The "[&\\\\]" should also be "[\n&\\\\]". This should prevent the regexp from ever looking beyond linebreaks.
      >
      > The principle is "find the line that contains a single-line-comment NOT in a string, then find the single-line-comment in that" (previously, it found single-line comments in strings, which screwed up URLs; I don't recall the messes it made, but it was a problem - revert the patch as diff the resulting HTML to see the problem).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            wallison Warwick Allison (closed Nokia identity) (Inactive)
            boddie David Boddie (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes