Re: panel startup time



fre, 23.04.2004 kl. 17.22 +0100, skrev Mark McLoughlin:
> Hi,
> 	I've just had a look at an strace of the panel[1] starting up to to get
> a rough idea of where time is being spent.
> 
> 	I thought I'd post it here because people might be interested. 
> 
> 	The big hitters are:
> 
>  - loading the icon theme information (35%)
> 
>      => Owen has a proposal that should go some way towards fixing this:
> 
> http://mail.gnome.org/archives/gtk-devel-list/2004-April/msg00065.html
> 

Is this comment found on kde-optimization lists kde org relevant here?

-------------------------------------------------------------------------
List:       kde-optimize
Subject:    Re: Using madvise for ld.so
From:       Andrew Morton <akpm () osdl ! org>
Date:       2004-03-17 19:58:17
Message-ID: <20040317115817.37d41522.akpm () osdl ! org>
[Download message RAW]

Lubos Lunak <l lunak suse cz> wrote:
>
>  I have a somewhat opposite question, related to the 'yet more preloading' 
> post. Just like this ld.so patch (and the hack that started this) speeds up 
> loading of large binaries by loading them sequentially in a large chunk, is 
> there some possibility to do the equivalent for inodes?

yup.  This is specific to ext2 and ext3, but that's not a bad thing to be
optimising for.

The inodes are laid out on disk as bunches of up to 32768 inodes, separated
by 128MB.  That's one inode table per blockgroup.  They are ordered by
ascending inode number.  So it's basically an array with gaps in it.

If you have a large number of small files which need to be read you should
run readdir() against each directory, reading the *entire* directory.  This
will give you all the inode numbers.  Then you should sort the pathnames by
inode number and then stat each file.  This will cause all the inodes to be
pulled into memory in ascending disk offset order.

--------------------------------------------------------------------------

Other things that come up there is using madvise()/posix_fadvise() to
populate the pagecache in an efficient manner when loading large amounts
of data from disk.

Cheers
Kjartan




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