From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/92 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Anti-bloat side project Date: Wed, 29 Jun 2011 15:27:36 -0400 Message-ID: <20110629192736.GG12592@brightrain.aerifal.cx> References: <20110627170806.GA24833@brightrain.aerifal.cx> <20110627211625.GC5036@port70.net> <20110627211909.GZ12592@brightrain.aerifal.cx> <20110627213805.GD5036@port70.net> <20110627213739.GA12592@brightrain.aerifal.cx> <20110627214300.GB12592@brightrain.aerifal.cx> <20110629141945.GL5036@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309376069 6365 80.91.229.12 (29 Jun 2011 19:34:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2011 19:34:29 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-176-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jun 29 21:34:25 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Qc0Wn-0003Hw-9f for gllmg-musl@lo.gmane.org; Wed, 29 Jun 2011 21:34:25 +0200 Original-Received: (qmail 3839 invoked by uid 550); 29 Jun 2011 19:34:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3831 invoked from network); 29 Jun 2011 19:34:24 -0000 Content-Disposition: inline In-Reply-To: <20110629141945.GL5036@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:92 Archived-At: On Wed, Jun 29, 2011 at 04:19:45PM +0200, Szabolcs Nagy wrote: > * Rich Felker [2011-06-27 17:43:00 -0400]: > > Of course a better question is... why does "hello world" need to load > > any modules anyway? Perhaps a best first step to fixing the problem > > would be to demodularize and static link any module that will always > > be loaded... > > btw applications are worse even if they are written in c Well we're now talking about applications which actually DO something... > gtk hello: > $ strace zenity --info --text=hello 2>&1 |wc -l > 6491 What about the gtk hello world from the gtk tutorial? > x terminal emulators: > $ strace xterm -e /bin/true 2>&1 |wc -l > 1214 > $ strace urxvt -e /bin/true 2>&1 |wc -l > 850 These numbers are not that bad... only about twice as much as Python and doing A LOT more. By the way, uuterm is 525, so the vast majority of that is xlib... (Of course then uuterm starts the evil blinking cursor if you leave it sitting.. ;) > $ strace -c -Scalls zenity --info --text=hello > % time seconds usecs/call calls errors syscall > ------ ----------- ----------- --------- --------- ---------------- > 13.70 0.000181 0 1510 417 stat64 > 9.84 0.000130 0 1277 573 open > 59.95 0.000792 1 988 getdents64 Looks like it's performing a lot of scandir or glob... > $ strace -c -Scalls -f firefox -P empty -url about:blank > .... > 64.14 0.849392 1361 624 26 futex 624 cases of lock contention during startup is pretty bad... > 0.24 0.003125 156 20 clone Of course 20 threads could contribute to that... > 0.48 0.006364 424 15 2 wait4 And lots of child processes..?! Rich