Closed
Bug 352615
Opened 19 years ago
Closed 16 years ago
[PatchReader] Group empty cells together to reduce the size of the diff page
Categories
(Bugzilla :: Attachments & Requests, defect, P3)
Bugzilla
Attachments & Requests
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: ispiked, Assigned: LpSolit)
Details
(Keywords: helpwanted, perf)
Attachments
(1 file, 1 obsolete file)
|
4.61 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Apparently a <table> is created and <tr>s are used for each /line/ of a patch. This seems wrong to me... there's got to be a way we can do this that isn't reminiscent of the '90s.
Updated•19 years ago
|
Assignee: attach-and-request → ui
Component: Attachments & Requests → User Interface
Updated•19 years ago
|
Summary: attachment.cgi?action=diff abuses tables badly → [PatchReader] attachment.cgi?action=diff abuses tables badly
Updated•19 years ago
|
Severity: normal → minor
| Assignee | ||
Comment 1•18 years ago
|
||
The main problem is the size of the generated page:
Viewing process_bug.cgi and Bug.pm with context=file generates a page which is 1Mb in size despite both files are much smaller (48 Kb and 113 Kb respectively).
We should find a way to decrease the size of the page by at least a factor of 2.
Assignee: ui → attach-and-request
Severity: minor → normal
Component: User Interface → Attachments & Requests
Target Milestone: --- → Bugzilla 4.0
| Assignee | ||
Updated•18 years ago
|
Comment 2•18 years ago
|
||
LpSolit is referring to https://bugzilla.mozilla.org/attachment.cgi?id=297468&action=diff&headers=1&context=file
I think the way to fix this is to do some smart stuff, ie if there is a + without a - then you could do a rowspan. Otherwise this would be kinda rough.
| Assignee | ||
Updated•17 years ago
|
Priority: P2 → P3
Target Milestone: Bugzilla 3.2 → ---
| Assignee | ||
Comment 3•16 years ago
|
||
In this patch, I group cells which are of the same kind (context, changed, removed, or added) using <br> for each line within each block. This makes pages to be 40-60% smaller (which is a huge improvement for the bandwidth).
The display is fine except that row numbers are no longer aligned with the patch content itself, especially when some lines are wrapped. That's because a newline in a cell cannot adapt itself based on what happens in another cell besides it. So I doubt we can make things better compared to what we have currently, unfortunately (unless there is some magical CSS rule which can fix this for us, but I'm pessimistic).
| Assignee | ||
Comment 4•16 years ago
|
||
I only use blocks where there is no line numbering so that the UI is not affected at all. Compared to my previous patch, the page size is only reduced by ~6-10% on average, with a higher gain when the patch has a lot of new/removed lines.
Another possible improvement would be to remove <pre> and add some CSS rules to existing classes, but this doesn't work well (Firefox, Opera, Safari, Internet Explorer and Google Chrome behave differently), so I leave that for another bug. Also, putting class="num" in <col> instead of repeating it for each row gives weird results. I'm not sure modern browsers support <col> and <colgroup> very well.
So I will take this patch for now.
Assignee: attach-and-request → LpSolit
Attachment #387590 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #387645 -
Flags: review+
| Assignee | ||
Updated•16 years ago
|
Flags: approval+
Target Milestone: --- → Bugzilla 3.6
| Assignee | ||
Comment 5•16 years ago
|
||
Morphing the bug summary to better reflect what I did in my patch.
Checking in template/en/default/filterexceptions.pl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/filterexceptions.pl,v <-- filterexceptions.pl
new revision: 1.128; previous revision: 1.127
done
Checking in template/en/default/attachment/diff-file.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/attachment/diff-file.html.tmpl,v <-- diff-file.html.tmpl
new revision: 1.8; previous revision: 1.7
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Summary: [PatchReader] attachment.cgi?action=diff abuses tables badly → [PatchReader] Group empty cells together to reduce the size of the diff page
You need to log in
before you can comment on or make changes to this bug.
Description
•