From gaoj@cpsc.ucalgary.ca Fri Jul 30 00:02:48 2004 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E94516A54E for ; Fri, 30 Jul 2004 00:02:47 +0000 (GMT) Received: from ensc.cpsc.ucalgary.ca (ensc.cpsc.ucalgary.ca [136.159.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2E7D43D1F for ; Fri, 30 Jul 2004 00:02:46 +0000 (GMT) (envelope-from gaoj@cpsc.ucalgary.ca) Received: from imgw1.cpsc.ucalgary.ca (imgw1.cpsc.ucalgary.ca [136.159.5.9]) by ensc.cpsc.ucalgary.ca (8.12.11/8.12.11) with ESMTP id i6U02Ev1028198 for ; Thu, 29 Jul 2004 18:02:14 -0600 (MDT) Received: from aibsd (sana-sa [136.159.7.231]) by imgw1.cpsc.ucalgary.ca (8.12.10/8.12.10) with SMTP id i6U029pi004043 for ; Thu, 29 Jul 2004 18:02:09 -0600 Received: by aibsd (sSMTP sendmail emulation); Thu, 29 Jul 2004 18:02:09 -0600 Message-Id: <200407300002.i6U029pi004043@imgw1.cpsc.ucalgary.ca> Date: Thu, 29 Jul 2004 18:02:09 -0600 From: "Jie Gao" Reply-To: Jie Gao To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: query-pr-summary.cgi generates very large html X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 69780 >Category: www >Synopsis: query-pr-summary.cgi generates very large html >Confidential: no >Severity: non-critical >Priority: low >Responsible: keramida >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 30 00:10:26 GMT 2004 >Closed-Date: Sun Aug 21 23:50:15 GMT 2005 >Last-Modified: Sun Aug 21 23:50:15 GMT 2005 >Originator: Jie Gao >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD aibsd-current 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Jul 15 10:00:38 MDT 2004 gaoj@aibsd-current:/usr/obj/usr/src/sys/AIBSD i386 >Description: The web page generated by query-pr-summary.cgi is very large. Today, my visit to http://www.freebsd.org/cgi/query-pr-summary.cgi resulted in a 1702446-byte html file. This is a bit too large for the people with slow internet connection. >How-To-Repeat: Visit http://www.freebsd.org/cgi/query-pr-summary.cgi with a www browser >Fix: I think the size can be reduced by doing the following: 1. Move the individual 'style="background-color: #ffffff"' code for each to a central style sheet, and define it for td. Only override the cells that need different background color. This could save about 700000 bytes (almost 40%). 2. Move the individual 'style="text-decoration: none;"' for the tags to a central style sheet, defining for "a" tag directly. This could save about 120000 bytes. 3. If we strip the spaces at the beginning of the lines, we can reduce the size with a further 90000 bytes. Totally the above measures can make the result less than half of the size now. >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-www->keramida Responsible-Changed-By: keramida Responsible-Changed-When: Fri Jul 30 08:50:43 GMT 2004 Responsible-Changed-Why: I'll try to work on this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=69780 State-Changed-From-To: open->analyzed State-Changed-By: keramida State-Changed-When: Mon Oct 25 11:13:57 GMT 2004 State-Changed-Why: The submitter is right. This is why I recently changed the query-pr-summary.cgi script to use a CSS stylesheet for the formatting, instead of inline HTML attributes. The difference in the size of the generated output is still a bit large when one compares a simple
 preformatted ASCII table 
and a full-blown HTML , but I've shaved off some of the most 
bloated HTML attributes.  There are also many bytes to save by 
squeezing all the  in a single row 
and deleting all the pretty-HTML-printing whitespace I've added to 
the beginning of lines. 

Apart from that, there isn't much else we can do to trim down the 
size of HTML output.  The rest is overhead of using an HTML table, 
instead of 
 text. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69780 
State-Changed-From-To: analyzed->suspended 
State-Changed-By: keramida 
State-Changed-When: Mon Oct 25 11:27:33 GMT 2004 
State-Changed-Why:  
I've done what I could for reducing the size of the HTML output generated by 
query-pr-summary.cgi -- it's still a lot larger than the original 
 table, 
so I'll leave this PR in `suspended' state in case someone has more ideas that 
will reduce the HTML text size further. 


Responsible-Changed-From-To: keramida->freebsd-www 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Mon Oct 25 11:27:33 GMT 2004 
Responsible-Changed-Why:  
Back to the pool. 
I've incorporated all the changes of Jie Cao to our query-pr-summary.cgi script. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69780 

From: Jie Gao 
To: Giorgos Keramidas 
Cc: freebsd-www@freebsd.org, freebsd-gnats-submit@freebsd.org
Subject: Re: www/69780: query-pr-summary.cgi generates very large html
Date: Mon, 25 Oct 2004 11:24:39 -0600

 Well, I think there is no good way to further more reduce the result size, 
 considering how many entries we have in the PR database. But can we 
 consider hidding some PRs by default? E.g. by default only the PRs within 
 the recent 6 months are shown, and a user has the option to display all PRs 
 regardless their time. I had a glance at the PRs and found more than half 
 of the PRs shown there were older than 6 months. I doubt how many people 
 are interested in seeing too old PRs.

From: Giorgos Keramidas 
To: Jie Gao 
Cc: bug-followup@freebsd.org
Subject: Re: www/69780: query-pr-summary.cgi generates very large html
Date: Mon, 25 Oct 2004 20:42:06 +0300

 On 2004-10-25 11:24, Jie Gao  wrote:
 > Well, I think there is no good way to further more reduce the result size,
 > considering how many entries we have in the PR database. But can we
 > consider hidding some PRs by default? E.g. by default only the PRs within
 > the recent 6 months are shown, and a user has the option to display all PRs
 > regardless their time. I had a glance at the PRs and found more than half
 > of the PRs shown there were older than 6 months. I doubt how many people
 > are interested in seeing too old PRs.
 
 That's an option.  It's already possible to limit the number of matches
 one sees though.  Instead of using query-pr-summary.cgi to list *ALL*
 the problem reports, a specific query can be given through:
 
 	http://www.freebsd.org/cgi/query-pr-summary.cgi?query
 
 This is what I usually do.
 
 Now that I look at the search form, it would probably be useful to add
 what you describe as an extra search criterion: start date and/or end
 date for the matches.  If someone else doesn't beat me to this, I'll
 work on it during the next days.
 
 - Giorgos
 
Responsible-Changed-From-To: freebsd-www->keramida 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Wed Mar 2 00:52:01 GMT 2005 
Responsible-Changed-Why:  
Grab this PR, since I plan to do some work near query-pr-summary.cgi 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69780 
State-Changed-From-To: suspended->closed 
State-Changed-By: keramida 
State-Changed-When: Sun Aug 21 23:48:57 GMT 2005 
State-Changed-Why:  
The current query-pr-summary.cgi script generates a much smaller 
HTML output tabel and uses CSS as much as possible for the style. 
There isn't much else I can do right now to make the output 
smaller in size, without reverting back to text-only output. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69780 
>Unformatted:
or elements of a