[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: malloc performance
From:       Lubos Lunak <l.lunak () sh ! cvut ! cz>
Date:       2002-02-13 9:59:44
[Download RAW message or body]

On Wed 13. February 2002 10:02, Kosoru Jozef wrote:
> > From: Matthias Elter
> >
> > Henrik Johnson wrote:
> > > My application TOra (Not in any of the KDE packages, but it is a KDE
> > > application and already supports KDE3) uses threads extensively. So
> > > making KDE not working with threads would basically force me to go
> > > back to Qt only. As long as it is optional (And distributions not
> > > using it) I have no problems with this.
> >
> > You misunderstood Lubos. Even with his malloc implementation
> > enabled KDE
> > will of course continue to support threads. Because of the use of
> > spinlocks for mutual exclusion it might perform a bit worse with many
> > threads running than the default implementation though.
>
> Multi-threaded appliactions are usually much more complicated than other
> simple apps. The main reason why to write multi-threaded programs is
> an efficiency, so providing a malloc solution which leads to a worse

 I personally think the main reason for multithreaded GUI programs is 
increased responsiveness. After all, making something multithreaded doesn't 
usually make it run faster on a single CPU.

> performance for multi-threaded apps is something like to say: "We have
> to
> support simple apps just because the more complex software is something
> which don't exist for KDE so who cares about their performance!"
> I think this is not a good plan to the future of the KDE.

 We're not talking about the future, we're talking about the present. At the 
present time, virtually every KDE app is, as you call it, 'simple apps'. And 
when I tested a program where several threads were only calling new and 
delete in loops, I actually had to raise the number of threads to at least 8 
in order to make the threads optimized malloc() to be a match for the 
malloc() with the simple lock (that might be different on SMP system though).

 Anyway a) it will need a configure switch, b) I bet you won't notice any 
multithreaded KDE apps running slower with it.

-- 
 Lubos Lunak
 llunak@suse.cz ; l.lunak@kde.org
 http://dforce.sh.cvut.cz/~seli
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic