Closed d7919 closed 1 day ago
Have now included another tweak which for the project I'm testing with has led to a reduction in the time spent processing comments by a factor of four, without missing any matches or hitting new matches (i.e. it gives the same results).
I think the regex as is (and before any of the changes in this PR) might have some false positives, e.g. matching ! end subroutine name
as a valid end.
OK, now also fixed the potential match of a commented out line when searching for the end of a block.
Tweaks SRC_CAPTURE_STR to avoid capturing the logical groups in this regex as we don't use them. This gives a slight optimisation to the "Processing comments" stage.
There are likely a few other places in sourceform that similar adjustments could be made, but they are less likely to give a noticeable speed up as, at least for the project I'm testing with, the SRC_CAPTURE_STR regex search dominates the processing comments stage.