Closed Bug 312191 Opened 19 years ago Closed 19 years ago

When g element display attribute is changed rendering is very slow with 1.5 beta 2 for same content that rendered quite OK on 1.5 beta 1

Categories

(Core :: SVG, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 311274

People

(Reporter: mike, Unassigned)

References

()

Details

(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1

The problem is slow rendering in FF 1.5 beta 2 when changing pages via a
javascript navigation widget.  FF 1.5 beta 1 performance was and is OK.

The sample file slowall.svg is SVG generated by SVGmaker from a 10 page
Microsoft Word file.  The content of each "page" in the document is enclosed by
a <g> element. A javascript navigation widget controls the visibility of each
page via display="inline" and diplay="none" on each page group.  

The basic file structure after executing the onload script is :

<svg width="100%" height="100%">
 <rect id="mousetrap" style="fill:#CCCCCC;stroke:none;opacity:0"
  x="-5000%" y="-5000%" width="10100%" height="10100%"/>
 <svg>
  <g id="Page_1" display="inline"><!-- Page 1 content --></g>
  <g id="Page_2" display="none"><!-- Page 2 content --></g>
  <g id="Page_3" display="none"><!-- Page 3 content --></g>
  <g id="Page_4" display="none"><!-- Page 4 content --></g>
  <g id="Page_5" display="none"><!-- Page 5 content --></g>
  <g id="Page_6" display="none"><!-- Page 6 content --></g>
  <g id="Page_7" display="none"><!-- Page 7 content --></g>
  <g id="Page_8" display="none"><!-- Page 8 content --></g>
  <g id="Page_9" display="none"><!-- Page 9 content --></g>
  <g id="Page_10" display="none"><!-- Page 10 content --></g>
 </svg>
 <svg><!-- Navigation widget --></svg>
</svg>

For ease of illustration please see

http://www.svgmaker.com/issues/slow3.svg

Slow3.svg, is produced by stripping all the page content from 
slowall.svg except for some minimal text (page footers). Page 3 is 
left with all the original content.  All the bare pages change 
"quickly" i.e. use the widget to page from 1 to 2 or from 2 to 1 - no problem. 
Changing to Page 3 is slow, similar to slowall.svg.



Reproducible: Always

Steps to Reproduce:
1. view http://www.svgmaker.com/issues/slowall.svg in FF 1.5 beta 2
2. Click a < or > navigation button in the green javascript navigation widget
3. wait for 20 seconds or more for the rendering to complete

Actual Results:  
FF 1.5 beta 1 - the page display changes acceptably (less than 1 second)
FF 1.5 beta 2 - the page display changes after a long interval (more than 20
seconds)

Expected Results:  
Rendered fast like 1.5 beta 1 does

FYI, in the example file, a mousetrap rect catches mouse events not made on the
original document content.  It is "large" to allow the widget to be 
dragged/dropped (well) outside of the document image when zoomed out
and/or panned.  

The function responsible for changing the page is "pcShowPage(p)". 
This function essentially turns the current page off and turns the 
new page (gpage) on.  

    currentpage.setAttributeNS(null,"display", "none");
    gpage.setAttributeNS(null,"display", "inline");

As a further test we tried using the visibility (visible/hidden) 
attribute instead of the display (inline/none) attribute.  
Slowall.svg took longer to load (~15s) and changing pages took much 
longer again (220s).

System Information:
OS Name	Microsoft Windows XP Professional
Version	5.1.2600 Service Pack 2 Build 2600
Processor	x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3000 Mhz
Processor	x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3000 Mhz
Total Physical Memory	512.00 MB
Total Virtual Memory	2.00 GB
Hard Drive	120GB
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b5) Gecko/20051012
Firefox/1.4.1 ID:2005101212

The repro steps simply lock my browser (firefox.exe is not responding).

->NEW

If needed I can probably get a regression date Vlad
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression

*** This bug has been marked as a duplicate of 311274 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.