[OLPC-devel] pygtk performance issue
Mitch Bradley
wmb at firmworks.com
Wed Sep 6 07:53:02 EDT 2006
The processor on OLPC is inherently slower than the processors that are
used in modern laptops. To get ultra low power you have to sacrifice
something. It seems unlikely that we would be able to hide that
inherent speed differential by a kernel change. In the short term, I
don't know of any planned hardware changes that would substantially
increase the performance of file system activity on USB drives.
I believe that "work smarter" is a key component of the OLPC plan. It
looks like you have found some "low-hanging fruit" that is ripe for the
picking. Improving pygtk to start up in a less "brute force" way would
benefit not only OLPC, but everybody else as well.
Marco Pesenti Gritti wrote:
> Hi,
>
> with the latest kernel strace is working on the board, so I've been
> able to track down the issue with the very very slow pygtk startup.
>
> For people not following the sugar list:
> http://mailman.laptop.org/pipermail/sugar/2006-August/000244.html
>
> A simple pygtk app is opening around 700 files on startup, a lot of
> these being ENOENT, and stat-ing another 200. A large part of the
> startup time seem to be due to this.
>
> So I did some profiling of the 'open' performance, using the attached
> test case. I bet there is a better way, but I think the results are
> interesting. The test case opens 10000 files, the results are the
> following:
>
> OLPC + USB hard disk : 6.5 seconds
> My laptop: 0.73 seconds
> My laptop + USB hard disk: 0.75 seconds
>
> OLPC is 9 times slower.
>
> My question is... can we expect this to be solved (or at least
> drastically reduced) in hardware or kernel space?
>
> Thanks,
> Marco
>
>
> ------------------------------------------------------------------------
>
> import sys
> import time
> import random
>
> t = time.time()
>
> i = 0
> while i < 10000:
> try:
> f = open('/media/OLPCRoot/bubu%d' % random.random(), 'r')
> f.close()
> except:
> pass
> i += 1
>
> new_t = time.time()
> print '10000 open: %f' % (new_t - t)
> t = new_t
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Devel mailing list
> Devel at laptop.org
> http://mailman.laptop.org/mailman/listinfo/devel
>
More information about the Devel
mailing list