[Sugar-devel] SVG performance

Tomeu Vizoso tomeu at sugarlabs.org
Tue Dec 9 09:52:04 EST 2008


On Tue, Dec 9, 2008 at 3:34 PM,  <pgf at laptop.org> wrote:
> walter wrote:
>  > And in the case of TA, I currently render about 30 svg files in the
>  > initialization phase, hence the long delay. I'll look into how I can
>  > background some of this.
>
> there's only so much cpu.  how will that help?

Placeholders could appear instantly, and those would be replaced by
the rendered blocks when each of those are ready.

Or we could block only on the ones that are visible at startup, then
render the rest on the background.

> i'd still like to know how fast it would be to render the equivalent
> bitmap.
>
> clearly SVG is the wave of the future, but current h/w is the
> wave of the past.  if pre-rendering our icons in predictably
> needed sizes (at build-time, not run-time) would help a lot, then
> it seems like we should do that.

I think the problem is that they depend on the screen size and
language, but we could render them at first boot and keep a cache on
disk. So first run would be slow, but provided we give appropriate
feedback, might not be so bad.

As many people have pointed before, there are loads of techniques that
were used when computers were much slower and more value was delivered
to the user. We cannot use all of those techniques for various
reasons, but many still hold valid.

Regards,

Tomeu

> paul
>
>  >
>  > -walter
>  >
>  > On Tue, Dec 9, 2008 at 9:11 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
>  > > On Tue, Dec 9, 2008 at 3:04 PM,  <pgf at laptop.org> wrote:
>  > >> bernie wrote:
>  > >>  > Jim Gettys wrote:
>  > >>  > > IIRC, librsvg is it.
>  > >>  > >
>  > >>  > > A bit more profiling to get through the tangled web of dependencies is
>  > >>  > > probably in order.
>  > >>  >
>  > >>  > To exclude the noise coming from  Python and GDK, I tried timing again
>  > >>  > with the command-line tool rsvg:
>  > >>  >
>  > >>  >   for i in *.svg; do echo $i; time rsvg $i $i.png; done
>  > >>  >
>  > >>  > This way I could not find any problematic svg file within the
>  > >>  > turtleart repository.  The slowest ones render in <0.1 seconds.
>  > >>
>  > >> i'm not sure i'd agree that "<0.1 seconds" isn't problematic.  how
>  > >> fast would the equivalent bitmap render?
>  > >
>  > > In order to not give a perception of slugginesh, all UI operations
>  > > should take less than 0.2s.
>  > >
>  > > If one icon takes 0.05s, we can render 4 of them before starting to look slow.
>  > >
>  > > So we need to make those values much lower, or stop rendering icons
>  > > during UI operations.
>  > >
>  > > Regards,
>  > >
>  > > Tomeu
>  > > _______________________________________________
>  > > Sugar-devel mailing list
>  > > Sugar-devel at lists.sugarlabs.org
>  > > http://lists.sugarlabs.org/listinfo/sugar-devel
>  > >
>  >
>  >
>  >
>  > --
>  > Walter Bender
>  > Sugar Labs
>  > http://www.sugarlabs.org
>
> =---------------------
>  paul fox, pgf at laptop.org
>  give one laptop, get one laptop --- http://www.laptop.com/xo
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>


More information about the Sugar-devel mailing list