> The loop is correct. FF should perform 2 to 10 times slower,
between
> 30 and 150 ms, nothing like 115682 msec. The problem is elsewhere.
>
> Domenico
I think I've identified the cause of the performance difference and
it is the "use" element:
<use xlink:href="#group" pointer-events="none" />
If you load the example below you can see the difference quite
clearly even with 100 rect elements.
I don't know if I am following the SVG std properly or if FF is doing
something that Op9 and ASV3 do not.
Simon
<?xml version="1.0" encoding="utf-8"?>
<svg width="500" height="600" version="1.1"
xmlns:foo="http://www.foo.com"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg">
<script type="text/ecmascript">
function test(evt){
var i=0;
var elm;
var r=document.getElementById('group');
var colR=r.getElementsByTagNameNS
('http://www.w3.org/2000/svg', 'rect');
while(elm=colR.item(i++)){
elm.setAttributeNS(null,'y',elm.getAttributeNS
('http://www.foo.com','y2'));
}
}
</script>
<g id="group">
<rect x='327' y='233' foo:y2='335' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#6F2E2F' />
<rect x='339' y='387' foo:y2='236' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#722BA3' />
<rect x='81' y='54' foo:y2='218' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#2AE4B0' />
<rect x='375' y='303' foo:y2='379' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3FA1A0' />
<rect x='101' y='302' foo:y2='113' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#2E06BD' />
<rect x='48' y='24' foo:y2='297' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#762E81' />
<rect x='325' y='248' foo:y2='106' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#7B59C4' />
<rect x='389' y='364' foo:y2='28' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#6F5A29' />
<rect x='357' y='96' foo:y2='346' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#6B1FC9' />
<rect x='317' y='59' foo:y2='314' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#23D1C5' />
<rect x='131' y='234' foo:y2='188' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#DA475E' />
<rect x='359' y='287' foo:y2='286' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#CD94EE' />
<rect x='369' y='281' foo:y2='298' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#959983' />
<rect x='144' y='122' foo:y2='96' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#FBA207' />
<rect x='426' y='29' foo:y2='162' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#1DB98A' />
<rect x='357' y='328' foo:y2='193' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#FD1612' />
<rect x='326' y='143' foo:y2='362' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#260722' />
<rect x='393' y='338' foo:y2='338' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#ADAF0B' />
<rect x='174' y='351' foo:y2='16' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3258EF' />
<rect x='351' y='189' foo:y2='130' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#43BB0F' />
<rect x='183' y='181' foo:y2='157' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#610E4E' />
<rect x='165' y='177' foo:y2='86' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#BF443A' />
<rect x='63' y='313' foo:y2='49' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#D6ABD6' />
<rect x='326' y='122' foo:y2='38' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#4ECCEB' />
<rect x='478' y='21' foo:y2='377' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#0DA8AE' />
<rect x='323' y='389' foo:y2='361' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#9130E4' />
<rect x='475' y='225' foo:y2='67' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#4358C2' />
<rect x='298' y='370' foo:y2='363' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#6395BE' />
<rect x='232' y='219' foo:y2='367' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#191171' />
<rect x='275' y='323' foo:y2='78' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#93EB61' />
<rect x='209' y='181' foo:y2='69' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#2A0DE4' />
<rect x='326' y='23' foo:y2='182' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#26C148' />
<rect x='64' y='139' foo:y2='10' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#BF2DF5' />
<rect x='190' y='361' foo:y2='119' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#FA5D75' />
<rect x='430' y='35' foo:y2='302' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#EC5B6B' />
<rect x='482' y='146' foo:y2='290' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3B0A90' />
<rect x='267' y='200' foo:y2='113' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#AFCBA4' />
<rect x='358' y='349' foo:y2='219' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#343524' />
<rect x='7' y='360' foo:y2='140' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#5BE36C' />
<rect x='334' y='43' foo:y2='13' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#CBA488' />
<rect x='96' y='318' foo:y2='242' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#6E7927' />
<rect x='467' y='58' foo:y2='51' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#9DFB81' />
<rect x='47' y='337' foo:y2='253' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3E4EAC' />
<rect x='340' y='48' foo:y2='97' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#B6494E' />
<rect x='314' y='237' foo:y2='241' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#DAD801' />
<rect x='345' y='303' foo:y2='25' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#C55BD0' />
<rect x='360' y='127' foo:y2='161' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#4BA77A' />
<rect x='334' y='353' foo:y2='48' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#F62084' />
<rect x='85' y='309' foo:y2='244' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#25F08F' />
<rect x='101' y='308' foo:y2='290' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#2919DE' />
<rect x='382' y='149' foo:y2='360' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#37902D' />
<rect x='124' y='0' foo:y2='382' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#0BF234' />
<rect x='392' y='305' foo:y2='111' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#2D82F1' />
<rect x='210' y='60' foo:y2='165' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#97A3D4' />
<rect x='205' y='163' foo:y2='364' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3F2280' />
<rect x='341' y='78' foo:y2='140' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#E84236' />
<rect x='475' y='380' foo:y2='224' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#32C902' />
<rect x='364' y='132' foo:y2='38' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#99D4F7' />
<rect x='429' y='366' foo:y2='365' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#311BFE' />
<rect x='5' y='354' foo:y2='266' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#877454' />
<rect x='104' y='243' foo:y2='104' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#35D259' />
<rect x='55' y='319' foo:y2='44' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#267543' />
<rect x='227' y='327' foo:y2='66' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#DE8315' />
<rect x='374' y='355' foo:y2='211' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#5E8323' />
<rect x='354' y='339' foo:y2='124' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#A8A8FF' />
<rect x='78' y='148' foo:y2='188' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#9E224A' />
<rect x='475' y='84' foo:y2='166' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#33EEED' />
<rect x='298' y='343' foo:y2='230' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#73E2BB' />
<rect x='147' y='272' foo:y2='301' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#1F3FAC' />
<rect x='329' y='182' foo:y2='159' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#F10E72' />
<rect x='138' y='96' foo:y2='11' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3080FF' />
<rect x='8' y='360' foo:y2='287' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#ED470D' />
<rect x='419' y='81' foo:y2='155' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3F3695' />
<rect x='144' y='380' foo:y2='94' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#D744C1' />
<rect x='421' y='110' foo:y2='260' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#4652D2' />
<rect x='367' y='288' foo:y2='332' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#898DD9' />
<rect x='259' y='74' foo:y2='309' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#EE4BE1' />
<rect x='350' y='221' foo:y2='188' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#F0FF14' />
<rect x='91' y='316' foo:y2='21' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#007BB2' />
<rect x='355' y='378' foo:y2='266' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#1A3E5F' />
<rect x='476' y='63' foo:y2='233' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#C2DF65' />
<rect x='143' y='208' foo:y2='147' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#75E21A' />
<rect x='238' y='331' foo:y2='281' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#03006F' />
<rect x='9' y='65' foo:y2='295' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#81A3EC' />
<rect x='32' y='46' foo:y2='152' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#0E28D9' />
<rect x='406' y='103' foo:y2='102' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#BFCD80' />
<rect x='410' y='164' foo:y2='385' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#4F6BA0' />
<rect x='44' y='358' foo:y2='113' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#06FD76' />
<rect x='77' y='48' foo:y2='300' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#84EA69' />
<rect x='391' y='154' foo:y2='211' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#819B08' />
<rect x='302' y='221' foo:y2='15' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#5C3712' />
<rect x='83' y='23' foo:y2='232' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#809984' />
<rect x='77' y='155' foo:y2='329' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#EA138F' />
<rect x='208' y='160' foo:y2='210' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#2CE34C' />
<rect x='464' y='69' foo:y2='319' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#D2B175' />
<rect x='1' y='10' foo:y2='89' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#89C4D5' />
<rect x='413' y='327' foo:y2='79' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#CEAFDD' />
<rect x='278' y='288' foo:y2='373' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#CA6294' />
<rect x='50' y='163' foo:y2='120' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#3D8D56' />
<rect x='67' y='100' foo:y2='158' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#126910' />
<rect x='256' y='12' foo:y2='357' width='10' height='6' stroke-
width='0.1' stroke='green' fill='#204386' />
</g>
<rect x='0' y='500' width='100' height='25' fill='red' onclick='test
(evt)' />
<text x='20' y='520' fill='blue' >Click Me</text>
<svg id="ref" x="300" y="500" width="100" height="80" viewBox="0 0
500 400">
<use xlink:href="#group" pointer-events="none" />
</svg>
</svg>
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/