public inbox for gnats-prs@sourceware.org
help / color / mirror / Atom feed
From: kmcfarland@starentnetworks.com
To: pdm-gnats@zamazal.org,gnats-prs@gnu.org,bug-gnats@gnu.org
Subject: gnatsweb/387: sub mark_urls can take over a minute to return for large PR
Date: Mon, 03 Jun 2002 16:21:00 -0000	[thread overview]
Message-ID: <E17F14K-0008O7-00@fencepost.gnu.org> (raw)

>Number:         387
>Category:       gnatsweb
>Synopsis:       sub mark_urls can take over a minute to return for large PR
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 03 19:16:55 -0400 2002
>Originator:     kmcfarla@starentnetworks.com
>Release:        v3.99.2 v40-beta1
>Organization:

>Environment:

linux PC with Apache
browser IE 5.50
>Description:

Despite our recommendation, we've had user putting large
device log file with PR description instead of making
it an attachment.

We were then finding that PRs with large log files one
example was:
-rw-r--r--    1 gnats    gnats      549458 May 30 19:57 4443

This PR would take just over a Minute to load in the browser.

I debugged through the perl code and was seeing that
the sub mark_urls was were all the time was spend...about
1 min just here.

This is a nice feature to mark email, urls, etc to be
a click away, but not worth the minute to get the PR.

I commented this line out and it now loads in about a sec
or less.  

I'd recommend either writing this to be a little faster
(like do it in a single pass) or simply remove it.






# takes a string,
# attempts to make urls, PR references and email addresses in that string into
# links:
# 'foo bar baz@quux.com flibbet PR# 1234 and furthermore
#  http://www.abc.com/whatever.html'
# is returned as:
# 'foo bar <a href="mailto:baz@quux.com">baz@quux.com</a> flibbet
#   <a href="http://site.com/cgi-bin/gnats?cmd=view;pr=1234;database=default">PR# 1234</a>
#   <a href="http://www.abc.com/whatever.html" target="showdoc">
#   http://www.abc.com/whatever.html</a>'
# returns the (possibly) modified string
# since we need to make three passes over the string, and the results of
# one pass would be fodder for another pass (ie. the PR url in a href
# would trigger the url matcher), we put each created link into an array,
# and substitute in a placeholder.
# after we've done all the link substitutions, we go back and replace the
# placeholders with the cached links from the array.
# it might be possible to order the substitutions so that they didn't
# step on each other (urls, then mailto:s, then PRs), but this fails
# when presented with ftp urls which include a username:
# ftp://user@ftp.foo.com/pub/foo/bar.gz
sub mark_urls {
>How-To-Repeat:

>Fix:
file:  gnatsweb.pl

sub view

      } else {
          # make urls and email addresses into live hrefs
          $val = mark_urls($val);
      }

simple comment out:
#$val = mark_urls($val);
>Unformatted:
 

_______________________________________________
Gnats-prs mailing list
Gnats-prs@gnu.org
http://mail.gnu.org/mailman/listinfo/gnats-prs


                 reply	other threads:[~2002-06-03 23:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17F14K-0008O7-00@fencepost.gnu.org \
    --to=kmcfarland@starentnetworks.com \
    --cc=bug-gnats@gnu.org \
    --cc=gnats-prs@gnu.org \
    --cc=pdm-gnats@zamazal.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).