Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Slow rendering of SVG

14 views
Skip to first unread message

Charles Lindsey

unread,
May 27, 2011, 9:42:40 AM5/27/11
to
SVG is an alternative to HTML especially suited to vector graphics, and is
supported by Opera.

I have been writing a slider in SVG (Javascrcipt to run on the client) and
it turned out to be incredibly slow compared to sliders written for HTML.
Having spent ages trying to optimize my Javascript, I concluded that it
was not the Javascript that was at fault, but the SVG rendering engine.

Note that I am using Opera 9.25, running on Sparc Solaris, and it may well
be that more recent Operas do not have the problem. Here is a short
example that illustrates the problem:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
style="background-color: #FFD700;"
onload="init()"
onmousemove="mousemove(evt)">
<script>
var rectangle
function init() {
rectangle = document.getElementById("rectangle")
}
function mousemove(evt) {
rectangle.setAttribute("transform", "translate(" + evt.clientX + ", "
+ evt.clientY + ")")
}
</script>
<rect width="100%" height="100%" fill="yellow"/>
<rect id="rectangle" x="0" y="0" width="40" height="20" fill="blue" stroke="red"/>
</svg>

That simply draws a small rectangle on your screen, and as you move the
mouse the rectangle follows it around. Running it under I.E. (using the
Adobe SVG plugin) the rectangle follows the mouse as fast as your wrist
can move it around. And the same is true in Opera with a similar script
written in HTML.

But with that SVG script, and my Opera 9.25, every move of the mouse takes
around 0.25 seconds for the effect to be seen (so it moves around the
screen at the rate of 4 jerks per second). And during that 0.25 of a
second the rendering engine must have obeyed around 25,000,000
instructions - whatever was it doing? Moreover, this delay seems a
constant start up delay, because other longer and more complicated
operations take exactly the same time.

So could I invite you all to run that script on assorted versions of
Opera (or other browsers), and on various hardware platforms, and to
report here (I can also provide the HTML script if anyone wants it).

Followups set to opera.general only.

--
Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131 Web: http://www.cs.man.ac.uk/~chl
Email: c...@clerew.man.ac.uk Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9 Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5

Eirik Byrkjeflot Anonsen

unread,
May 30, 2011, 1:44:14 AM5/30/11
to
"Charles Lindsey" <c...@clerew.man.ac.uk> writes:

> SVG is an alternative to HTML especially suited to vector graphics, and is
> supported by Opera.
>
> I have been writing a slider in SVG (Javascrcipt to run on the client) and
> it turned out to be incredibly slow compared to sliders written for HTML.
> Having spent ages trying to optimize my Javascript, I concluded that it
> was not the Javascript that was at fault, but the SVG rendering engine.
>
> Note that I am using Opera 9.25, running on Sparc Solaris, and it may well
> be that more recent Operas do not have the problem. Here is a short
> example that illustrates the problem:
>

[...]


>
> So could I invite you all to run that script on assorted versions of
> Opera (or other browsers), and on various hardware platforms, and to
> report here (I can also provide the HTML script if anyone wants it).

My 11.10 (official version) on linux reacts quite quickly. In fact, the
rectangle moves before the mouse pointer does...

This is easily seen by moving the mouse at a slow, steady pace and look
at the relative positions of the rectangle and the mouse pointer. The
rectangle is ahead of the mouse pointer as long as the mouse is moving.
The only explanation I have for how this can happen is that we somehow
overcompensate for the motion, but I have problems believing that.

eirik

Aaron W. Hsu

unread,
May 30, 2011, 5:51:47 PM5/30/11
to
On Mon, 30 May 2011 01:44:14 -0400, Eirik Byrkjeflot Anonsen
<ei...@opera.com> wrote:

> My 11.10 (official version) on linux reacts quite quickly. In fact, the
> rectangle moves before the mouse pointer does...

Also, see the recent snapshot released by Opera Desktop Team. Apparently,
there are some SVG related things in there.

Aaron W. Hsu

--
Programming is just another word for the lost art of thinking.

Charles Lindsey

unread,
Jun 2, 2011, 6:39:01 AM6/2/11
to
In <877h983...@trittico.eng.oslo.osa> Eirik Byrkjeflot Anonsen <ei...@opera.com> writes:

>My 11.10 (official version) on linux reacts quite quickly. In fact, the
>rectangle moves before the mouse pointer does...

OK. Can you layy our hands on an Opera 10.01 (preferably on a Sparc Solaris
if you still have one) and report? For sure it was painful on my Opera 9.25.

DoN. Nichols

unread,
Jun 3, 2011, 9:40:34 PM6/3/11
to
On 2011-06-02, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
> In <877h983...@trittico.eng.oslo.osa> Eirik Byrkjeflot Anonsen <ei...@opera.com> writes:
>
>>My 11.10 (official version) on linux reacts quite quickly. In fact, the
>>rectangle moves before the mouse pointer does...
>
> OK. Can you layy our hands on an Opera 10.01 (preferably on a Sparc Solaris
> if you still have one) and report? For sure it was painful on my Opera 9.25.

FWIW -- I've got a copy of opera-10.01.gcc4-static-qt3.tar.bz2 still
sitting on one of my UltraSPARC systems -- but the installed one
is opera-10.11.gcc4-static-qt3.tar.bz2, and I don't think that I
have ever attempted to access SVG

Are the older versions still available for download? If not, I
could provide this one to whoever wants to run this test -- assuming
that Opera has no objection?

Note that all of the relatively recent "tar.bz2" files have a
bug which I reported several time before Opera dropped support for
Solaris and UltraSPARC. My fix for this was to add the following two
lines below the "debug_level='-'" near the top of the install.sh script.

======================================================================
PATH=/usr/xpg4/bin:$PATH
export PATH
======================================================================

The actual problem is in the section much deeper into the
script:

======================================================================
manifest_contains ()
{
grep -q "$1"'$' Manifest.md5
}
======================================================================

The "-q" option is not supported by the default grep (/bin/grep) found
with an unmodified path, causing errors whenever the unmodified script
is run -- unless the installer (root) has /usr/xpg4/bin before /usr/bin
in the normal PATH.

Good Luck,
DoN.

--
Remove oil spill source from e-mail
Email: <BPdnic...@d-and-d.com> | Voice (all times): (703) 938-4564
(too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---

Eirik Byrkjeflot Anonsen

unread,
Jun 6, 2011, 1:45:20 AM6/6/11
to
"DoN. Nichols" <BPdnic...@d-and-d.com> writes:

> On 2011-06-02, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
>> In <877h983...@trittico.eng.oslo.osa> Eirik Byrkjeflot Anonsen <ei...@opera.com> writes:
>>
>>>My 11.10 (official version) on linux reacts quite quickly. In fact, the
>>>rectangle moves before the mouse pointer does...
>>
>> OK. Can you layy our hands on an Opera 10.01 (preferably on a Sparc Solaris
>> if you still have one) and report? For sure it was painful on my Opera 9.25.
>
> FWIW -- I've got a copy of opera-10.01.gcc4-static-qt3.tar.bz2 still
> sitting on one of my UltraSPARC systems -- but the installed one
> is opera-10.11.gcc4-static-qt3.tar.bz2, and I don't think that I
> have ever attempted to access SVG
>
> Are the older versions still available for download? If not, I
> could provide this one to whoever wants to run this test -- assuming
> that Opera has no objection?

It seems the download page at opera.com still has more or less the whole
10 series available. But I don't have any solaris machine any more,
sparc or otherwise.

As for Opera having objections to people offering opera packages for
download, I'm sure we have no problems with it in general. Although
we'll probably be somewhat annoyed if the search engines etc. are
modified. (This is my personal opinion, and should not be construed as
an official statement, of course.)

eirik

Charles Lindsey

unread,
Jun 6, 2011, 7:06:34 AM6/6/11
to

>On 2011-06-02, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
>> In <877h983...@trittico.eng.oslo.osa> Eirik Byrkjeflot Anonsen <ei...@opera.com> writes:
>>
>>>My 11.10 (official version) on linux reacts quite quickly. In fact, the
>>>rectangle moves before the mouse pointer does...
>>
>> OK. Can you layy our hands on an Opera 10.01 (preferably on a Sparc Solaris
>> if you still have one) and report? For sure it was painful on my Opera 9.25.

>FWIW -- I've got a copy of opera-10.01.gcc4-static-qt3.tar.bz2 still
> sitting on one of my UltraSPARC systems -- but the installed one
> is opera-10.11.gcc4-static-qt3.tar.bz2, and I don't think that I
> have ever attempted to access SVG

Ah! I had thought that 10.01 was the latest that worked for Sparc, but I
see that 10.11 is in fact sparcable. Please could you try my example on
your 10.11? http://swiftys.org.uk/graphics.html is a convenient place to
find it, and the issue is whether or not the rectangle follows the mouse
smoothly or jerkily.

> Are the older versions still available for download? If not, I
>could provide this one to whoever wants to run this test -- assuming
>that Opera has no objection?

There is quite a selection of 10.* still available on the Opera site.

> Note that all of the relatively recent "tar.bz2" files have a
>bug which I reported several time before Opera dropped support for
>Solaris and UltraSPARC. My fix for this was to add the following two
>lines below the "debug_level='-'" near the top of the install.sh script.

OK, I shall use the .gz version

DoN. Nichols

unread,
Jun 6, 2011, 8:31:36 PM6/6/11
to
On 2011-06-06, Eirik Byrkjeflot Anonsen <ei...@opera.com> wrote:
> "DoN. Nichols" <BPdnic...@d-and-d.com> writes:
>
>> On 2011-06-02, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
>>> In <877h983...@trittico.eng.oslo.osa> Eirik Byrkjeflot Anonsen <ei...@opera.com> writes:
>>>
>>>>My 11.10 (official version) on linux reacts quite quickly. In fact, the
>>>>rectangle moves before the mouse pointer does...
>>>
>>> OK. Can you layy our hands on an Opera 10.01 (preferably on a Sparc Solaris
>>> if you still have one) and report? For sure it was painful on my Opera 9.25.
>>
>> FWIW -- I've got a copy of opera-10.01.gcc4-static-qt3.tar.bz2 still
>> sitting on one of my UltraSPARC systems -- but the installed one
>> is opera-10.11.gcc4-static-qt3.tar.bz2, and I don't think that I
>> have ever attempted to access SVG
>>
>> Are the older versions still available for download? If not, I
>> could provide this one to whoever wants to run this test -- assuming
>> that Opera has no objection?
>
> It seems the download page at opera.com still has more or less the whole
> 10 series available. But I don't have any solaris machine any more,
> sparc or otherwise.

Good enough. As long as they are still there for download, I
have no need to offer them directly.

> As for Opera having objections to people offering opera packages for
> download, I'm sure we have no problems with it in general. Although
> we'll probably be somewhat annoyed if the search engines etc. are
> modified. (This is my personal opinion, and should not be construed as
> an official statement, of course.)

Since I have no idea how to modify the search engines anyway,
that is no problem. I was simply offering the older version if someone
else with an UltraSPARC wanted to test on their system.

However -- FWIW -- I have recently discovered a URL which is
very slow to start up -- and may well be due to the SVG problem under
discussion.

http://www.baldor.com/products/ac_motors.asp

In particular -- it appears to be slow to display the left-hand column
when I try to scroll up or down. I don't get the same slow behavior
when using Firefox at an alternate check, FWIW.

I'm using Opera 10.11 on Solaris 10 Sun Blade 2000 with FFB2+
(Creator 3D) framebuffer, FWIW.

Enjoy,

DoN. Nichols

unread,
Jun 6, 2011, 8:41:24 PM6/6/11
to
On 2011-06-06, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
> In <slrniuj38h.72...@Katana.d-and-d.com> "DoN. Nichols" <BPdnic...@d-and-d.com> writes:

[ ... ]

>>FWIW -- I've got a copy of opera-10.01.gcc4-static-qt3.tar.bz2 still
>> sitting on one of my UltraSPARC systems -- but the installed one
>> is opera-10.11.gcc4-static-qt3.tar.bz2, and I don't think that I
>> have ever attempted to access SVG
>
> Ah! I had thought that 10.01 was the latest that worked for Sparc, but I
> see that 10.11 is in fact sparcable. Please could you try my example on
> your 10.11? http://swiftys.org.uk/graphics.html is a convenient place to
> find it, and the issue is whether or not the rectangle follows the mouse
> smoothly or jerkily.

O.K. It is jerky -- quite so -- once I turn on JavaScript
(which I normally keep disabled for new pages, and enabled only for
pages where I *need* what is offered by the JavaScript.

And yes -- Firefox is quite smooth by comparison.

FWIW I'm running this on Solaris 10 on a Sun Blade 2000 with a
Creator-3D FFB2+ framebuffer.

I've also discovered that some web pages are very slow to scroll
or to come up at first. I suspect that they are using the same SVG
features, and as more and more pages start using it, I may be forced to
abandon Opera, in spite of it feeling better for me than the others.

>> Are the older versions still available for download? If not, I
>>could provide this one to whoever wants to run this test -- assuming
>>that Opera has no objection?
>
> There is quite a selection of 10.* still available on the Opera site.

As I was just reassured in a previous post.

>> Note that all of the relatively recent "tar.bz2" files have a
>>bug which I reported several time before Opera dropped support for
>>Solaris and UltraSPARC. My fix for this was to add the following two
>>lines below the "debug_level='-'" near the top of the install.sh script.
>
> OK, I shall use the .gz version

I have no idea whether the .gz version is any different other
than in the compression used on the tar file. I suspect that it will
behave the same. I was assuming that the pkg format files would behave
better, but I like to control where it installs and what it overwrites,
so I go (went) for the .tar versions instead.

Charles Lindsey

unread,
Jun 8, 2011, 12:56:34 PM6/8/11
to

>On 2011-06-06, Charles Lindsey <c...@clerew.man.ac.uk> wrote:

>> Ah! I had thought that 10.01 was the latest that worked for Sparc, but I
>> see that 10.11 is in fact sparcable. Please could you try my example on
>> your 10.11? http://swiftys.org.uk/graphics.html is a convenient place to
>> find it, and the issue is whether or not the rectangle follows the mouse
>> smoothly or jerkily.

> O.K. It is jerky -- quite so -- once I turn on JavaScript
>(which I normally keep disabled for new pages, and enabled only for
>pages where I *need* what is offered by the JavaScript.

> And yes -- Firefox is quite smooth by comparison.

OK, so it seems upgrading to 10.11 is not going to improve things.

>FWIW I'm running this on Solaris 10 on a Sun Blade 2000 with a
> Creator-3D FFB2+ framebuffer.

Mine is an ultra-sparc-2 with a similar framebuffer. Looks like I need to
start looking at having a Firefox on hand.

> I've also discovered that some web pages are very slow to scroll
>or to come up at first. I suspect that they are using the same SVG
>features, and as more and more pages start using it, I may be forced to
>abandon Opera, in spite of it feeling better for me than the others.

For a really sloooooowwwww system, try to locate some product on the
Farnell Website. It seems to recompute the whole page each time your mouse
even blinks. Radiospares do much better.

DoN. Nichols

unread,
Jun 9, 2011, 9:38:27 PM6/9/11
to
On 2011-06-08, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
> In <slrniuqstk.dl...@Katana.d-and-d.com> "DoN. Nichols" <BPdnic...@d-and-d.com> writes:
>
>>On 2011-06-06, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
>
>>> Ah! I had thought that 10.01 was the latest that worked for Sparc, but I
>>> see that 10.11 is in fact sparcable. Please could you try my example on
>>> your 10.11? http://swiftys.org.uk/graphics.html is a convenient place to
>>> find it, and the issue is whether or not the rectangle follows the mouse
>>> smoothly or jerkily.
>
>> O.K. It is jerky -- quite so -- once I turn on JavaScript
>>(which I normally keep disabled for new pages, and enabled only for
>>pages where I *need* what is offered by the JavaScript.
>
>> And yes -- Firefox is quite smooth by comparison.

[ ... ]

>> I've also discovered that some web pages are very slow to scroll
>>or to come up at first. I suspect that they are using the same SVG
>>features, and as more and more pages start using it, I may be forced to
>>abandon Opera, in spite of it feeling better for me than the others.
>
> For a really sloooooowwwww system, try to locate some product on the
> Farnell Website. It seems to recompute the whole page each time your mouse
> even blinks. Radiospares do much better.

Well ... I've been reading from the start the web comic
http://wapsisquare.com/, and in about the last year or so, it
reformatted to a vertical stack of panels, and required vertical
scrolling to see all the panels. Given this discussion, I dropped back
to FireFox to read the last year and a half.

Sigh -- I normally like Opera for everything, but there are
things like this which force me to other browsers, since there is no
longer any hope for upgrades here.

Hmm ... O.K. 11.11 works fine on an Intel Ubuntu -- but since I
am not at the physical console of that, I don't get sound from sites
which have sound.

I still wish that the UltraSPARC had not been abandoned.

Enjoy,

DoN. Nichols

unread,
Jul 21, 2011, 6:37:01 PM7/21/11
to
Why does this keep showing up once every few weeks?

Sounds like some news server keeps crashing and being restored from
backups.

I'll snip most of it -- just leaving the attribution lines with
dates.

On 2011-06-07, DoN. Nichols <BPdnic...@d-and-d.com> wrote:
> On 2011-06-06, Charles Lindsey <c...@clerew.man.ac.uk> wrote:
>> In <slrniuj38h.72...@Katana.d-and-d.com> "DoN. Nichols" <BPdnic...@d-and-d.com> writes:

Enjoy,

0 new messages