Kristis,

I added a gettimeofday timer to prepare_activity as shown in the attached
code snippet.  Let me know if there are any problems with the way I did this
test.

For both small and large commit log messages the timing results are
comparable between the regular expressions.

For a one line commit log message, your regular expressions are about 2
milliseconds slower (.084 vs .082 seconds).  For the large svnmerge log
message, your regular expression are 3 milliseconds slower (.473 vs. .470
seconds).

Regards,
Mike
----
    open ( LOGFILE1, ">> /tmp/logfile");
  # measure elapsed time
  $t0 = [gettimeofday];

    print LOGFILE1 "SCM.pm: prepare_activity - entry\n";
    if ( $self->activity()->name() eq $ACTIVITY_COMMIT ) {
        notify( "Preparing for a commit\n" );
        print LOGFILE1 "SCM.pm: prepare_activity - preparing for a
commit\n";
        $self->prepare_activity_commit( @remaining_arguments );
    } elsif ( $self->activity()->name() eq $ACTIVITY_VERIFY ) {
        print LOGFILE1 "SCM.pm: prepare_activity - preparing for
verification\n";
        notify( "Preparing for verification\n" );
        $self->prepare_activity_verify( @remaining_arguments );
    } elsif ( $self->activity()->name() eq $ACTIVITY_TAG ) {
        notify( "Preparing for tagging\n" );
        print LOGFILE1 "SCM.pm: prepare_activity - preparing for tagging\n";
        $self->prepare_activity_tag( @remaining_arguments );
    } else {
        scmbug_error( $GLUE_ERROR_INVALID_ACTIVITY, "'" .
$self->activity()->name() . "' is an invalid integration activity.\n" );
    }

    print LOGFILE1 "SCM.pm: prepare_activity - before
prepare_final_log_message\n";
    $self->prepare_final_log_message( $policies );

  $t1 = [gettimeofday];
  $t0_t1 = tv_interval $t0, $t1;
  print LOGFILE1 "SCM.PM: prepare_activity - Time Interval is: '$t0_t1'\n";
    print LOGFILE1 "SCM.pm: prepare_activity - return\n";

-----Original Message-----
From: Brown, Mike 
Sent: Monday, January 21, 2008 11:27 AM
To: 'Kristis Makris'
Cc: '[email protected]'
Subject: RE: [scmbug-users] very large commit comments break scmbug +
bugz illa


Kristis,

Yes, I tested with my large commit message.  The regex I sent you works for
both the simple single line log message with a trailing bug # and the 300KB
log message from svnmerge with a trailing bug #.

I'll try your suggestions and let you know what I find.

Regards,
Mike

-----Original Message-----
From: Kristis Makris [mailto:[EMAIL PROTECTED]
Sent: Monday, January 21, 2008 11:11 AM
To: Brown, Mike
Cc: '[email protected]'
Subject: RE: [scmbug-users] very large commit comments break scmbug +
bugz illa


On Mon, 2008-01-21 at 10:55 -0600, Brown, Mike wrote:
> I changed the regex instead of changing all of my repositories to use a
non
> default property.  This simpler regex appears to work for the default
> subversion + TortoiseSVN configuration I use.  

Have you tested it with a long log message ?

>            log_bugid_regex => 'Issue:\s(\d+?)$',
>            log_body_regex => '(.*)\s*Issue:\s\d+?$',
> 
> Let me know if this simplified regex will break something else in scmbug.

I think the regexes will work, but may lead to long processing times on
long log messages again. You essentially expect log messages to be of
the format:

++++++++++++++++++++++
My log message goes here
Issue: 345,7654,88
++++++++++++++++++++++

The regex you supplied allows for that,. But the long processing times
were caused due to the regex evaluation taking too long to match. We had
made the regex more restrictive in the example I had sent you and you
tried by changing:


        log_bugid_regex => 'bug\s*([\d|\s|,|#]*?):',

to
        log_bugid_regex => '^bug\s*([\d|\s|,|#]*?):',

essentially adding the "^" character in the beginning. This forces the
regex to match from the beginning of a line, drastically reducing
evaluation time. To still accomplish that, and maintain your requirement
that the issue numbers are listed after the log message, I would
recommend you change them to something like:


           log_bugid_regex => '^.*\s*Issue:\s(\d+?)$',
           log_body_regex => '^(.*)\s*Issue:\s\d+?$',

Or if these fail, at least manage to sneak a "^" in the beginning of both
regexes.

Let me know how this works,

Kristis
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to