Re: Module Proposal: GNOME Shell



On Sun, 2010-04-04 at 13:33 +0000, Sam Spilsbury wrote:

> >> The other problem with GNOME-Shell is that the vast majority of it
> >> runs under a dynarec with javascript, which, although fast, can never
> >> be faster than optimized C/C++ code.
> >
> > The large majority of code that runs *for each frame* is written in C.
> > The fact that some Javascript runs when you click on a button is pretty
> > much irrelevant to the performance of the shell. But yes, I can't really
> > deny the theory that it would be (just slightly) faster if everything
> > was written in C.
> >
> > [ I'm sure someone has a benchmark somewhere of a Javascript JIT beating
> >  out compiled C code by using run-time statistics or by having a
> >  smaller code size by not compiling never-reached code branches.
> >  It's never going to be the normal case. And doesn't matter. ]
> 
> It matters a _lot_ for startup time (which is a problem for ubuntu).
> Opening compiled libraries with dlopen is slow enough already -
> loading an entire javascript JIT compiler, then parsing all the code,
> then executing it on first pass is _still_ slow because the
> optimization doesn't happen until later.
> 
> I've measured startup times of the entire Shell stack of about 30
> seconds, and this is an EeePC 900 - underpowered yes, but not slow out
> of the box. Compared to mutter, which starts in about 3 seconds (and
> as you said, is all implemented in C), I see this as a big problem (a
> problem created by trying to couple far too much into the window
> manager process).
> 
> I run compiz 0.9 on this machine, and I can load about 50 plugins
> written in C++ sequentially using dlopen () with debugging symbols
> faster than I can load gnome-shell.

How did you track that speed difference down to the use of Javascript?

- Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]