• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Slow and bloated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow and bloated?


  • Subject: Re: Slow and bloated?
  • From: Brent Gulanowski <email@hidden>
  • Date: Sun, 25 Jul 2004 10:32:10 -0400

On Sun, 25 Jul 2004 06:59:20 +0200, Allan Odgaard <email@hidden> wrote:
> On 25. Jul 2004, at 6:04, Brent Gulanowski wrote:
>
> > Maybe you all need more RAM.
>
> I have 645 MB free after a test compile and 0 MB loaded from the swap
> file, so I assume I'm good...
>
> > Compiling say a 500 line source file for me is nearly instantaneous. I
> > can compile a 50k-line project from clean in under a minute. I can
> > build Adium (deployment), with 1000+ files, in six minutes.
>
> What??? You can compile 50,000 lines of source in under a minute? How
> many lines are Adium? And is it really 1,000+ files?

Counting *.[hcm] it is. The headers count for forty percent. It
exceeds 125k lines of code. And it's made of around a dozen
sub-projects, since they break everything they can out into libraries
and plugins. There's more if you count others, but they aren't as
significant. JXTA-C (the 50k project) is all C.

The SLOCCount summary for JXTA-C (295 .h and .c files, 6 .cpp):

ansic:        44858 (95.66%)
cpp:           1200 (2.56%)
sh:             463 (0.99%)
java:           374 (0.80%)
Total Physical Source Lines of Code (SLOC)                = 46,895

Here's my time results for JXTA-C (using make -- the xcode project
doesn't build everything):
      215.59 real        88.22 user       143.87 sys

The SLOCCount summary for Adium:
Totals grouped by language (dominant language first):
objc:         74033 (53.88%)
ansic:        56317 (40.99%)
jsp:           4255 (3.10%)
sh:            1835 (1.34%)
perl:           655 (0.48%)
python:         196 (0.14%)
lex:             78 (0.06%)
php:             34 (0.02%)
Total Physical Source Lines of Code (SLOC)                = 137,403

My command line results (after cleaning all targets in XCode):
brentgulanowski@monolith:adium$time xcodebuild -project adium.xcode
[snip all build messages]
real    4m44.265s
user    4m1.920s
sys     2m24.010s

So it's even better than I said. xcode's build system of course is
multi-processor aware. But even if you doubled this (which wouldn't be
fair as pch uses only 1 proc, same with copy files), it's only eight
minutes.

>
> I created this file:
>
>     #import <Cocoa/Cocoa.h>
>     int main (int argc, char const* argv[])
>     {
>        return 0;
>     }
>
> And saved it as both tst.m and tst.mm, here are the timings:
>
> % time g++ -Os -c tst.m
> 1.790u 0.550s 0:02.42 96.6%     0+0k 0+10io 0pf+0w
> % time g++ -Os -c tst.mm
> 3.400u 0.800s 0:04.72 88.9%     0+0k 0+11io 0pf+0w
>
> As can be seen, ObjectiveC++ takes, for this small file, twice as long
> as ObjectiveC.


My results:

brentgulanowski@monolith:temp$time g++ -Os -c tst.mm
real    0m2.791s
user    0m2.270s
sys     0m0.480s
brentgulanowski@monolith:temp$time g++ -Os -c tst.m
real    0m1.711s
user    0m1.320s
sys     0m0.360s

When I used gcc instead of g++ it was a tiny bit faster. Does gcc just
call g++ when needed? Why would it be different? I've never used g++,
I don't write any C++. But note it isn't twice as long between c and
c++, but about 65% longer.

>
> Furthermore, even this empty files takes two seconds, making your claim
> of 1,000+ files in deployment mode compile in 6 minutes seem like a
> distant dream (although the above is w/o pre-compiled headers, which
> may make a lot of a difference, but my 18 KLOC project still takes in
> the order of 20 minutes for the deployment build, and that is with
> precompiled headers, but as said, also using a lot of ObjectiveC++,
> which I think is where GCC has the biggest problem)...

pch does make a lot of difference! I wouldn't claim otherwise.

Well obviously it was a worthy investment to buy a dual system for
development. What are your system specs? Mine specifically are:
G4-Dual867 MDD
1 MB cache per processor
1.5GB PC2700 RAM
system drive (15GB on 66MHz bus)
data drive (60GB on 100MHz bus)

A G5 would certainly smoke this so badly it would be funny. I could
always try to run some tests on the display machine at the local Apple
reseller.

--

Brent Gulanowski
http://www.boredastronaut.com
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Slow and bloated?
      • From: Allan Odgaard <email@hidden>
References: 
 >Slow and bloated? (From: "Theodore H. Smith" <email@hidden>)
 >Re: Slow and bloated? (From: Nick Zitzmann <email@hidden>)
 >Re: Slow and bloated? (From: Allan Odgaard <email@hidden>)
 >Re: Slow and bloated? (From: Nick Zitzmann <email@hidden>)
 >Re: Slow and bloated? (From: Brent Gulanowski <email@hidden>)
 >Re: Slow and bloated? (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: Slow and bloated?
  • Next by Date: Re: How can I get the source code?
  • Previous by thread: Re: Slow and bloated?
  • Next by thread: Re: Slow and bloated?
  • Index(es):
    • Date
    • Thread