Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Optimerings fråga
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Scandinavian
View previous topic :: View next topic  
Author Message
colofsson
n00b
n00b


Joined: 05 May 2006
Posts: 4
Location: Växjö, Sweden

PostPosted: Fri May 05, 2006 9:33 pm    Post subject: Optimerings fråga Reply with quote

Hej,

Jag sitter just nu på en Fujitsu Siemens Amilo Pro V2030 vilket inte är den bästa laptopen
på marknaden direkt. All kompilering tar enormt lång tid (emerge KDE tog ca. 12h). Min
CFLAGS ser ut som följande:

Code:
CFLAGS="-O3 -march=pentium-m -pipe -mfpmath=sse -fomit-frame-pointer"


Samt att jag har MAKEOPTS="-j2". Min hårdvara är:

Intel Celeron M 1.5GHz 1MB L2 Cache
40GiB SATA HDD
512MB RAM (DDR333)

Är det rimligt att det ska ta så lång tid att kompilera, eller ska jag ändra på något som gör att
det skulle gå fortare?

Tack för svaren på förhand!
_________________
Swedish moist snuff comes in two forms, one pre-compiled and one to compile yourself :D
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 520
Location: The Maldives

PostPosted: Sat May 06, 2006 11:39 am    Post subject: Reply with quote

Så mycket som jag vet är kde c++ kodat, vilket gcc kompillatorn har svårt med att möla igenom. Dvs optimering här är inte bara i dina CFLAGS och MAKEOPTS. Det tar en hiskelig tid att gå igenom och kompillera KDE och 12 timmar låter inte helt omöjligt med den hårdvaran du har. Men generellt så, ju färre optimeringar du har, ju fortare går det.

Vet inte, men gcc ver4 är väl mer anpassad att kompillera c++ kod?
Back to top
View user's profile Send private message
colofsson
n00b
n00b


Joined: 05 May 2006
Posts: 4
Location: Växjö, Sweden

PostPosted: Sat May 06, 2006 6:15 pm    Post subject: Reply with quote

Jo det kan nog vara så...Körde med -Os innan istället för -O3 i mina CFLAGS vilket slöade ned kompileringen och gav en bättre optimering.
Nu har jag ändrat det och det går ganska mycket fortare igen...Kör just nu en vacker liten:

Code:
emerge -e system && emerge -e world


Kommer ta en stund, men det går markant fortare än innan.
_________________
Swedish moist snuff comes in two forms, one pre-compiled and one to compile yourself :D
Back to top
View user's profile Send private message
megadonkey
Apprentice
Apprentice


Joined: 24 Apr 2004
Posts: 224
Location: Bohuslän, Sweden

PostPosted: Sat May 06, 2006 11:39 pm    Post subject: Reply with quote

Från Gentoo wiki
Quote:
-O3

Will enable all of the optimizations specified by -O2 plus the -finline-functions, -fweb,-funswitch-loops and -frename-registers optimizations. However, these should not be used on a system with low memory or drive space. The end binary output will probably be larger, and may not be any faster. In fact, it may slow down the program since larger binaries takes longer to load from the hard drive into the memory and the hard drive is a bottleneck even on fast computers (this makes the -O3 flag even less of a good idea on most laptops). It will also cause larger memory usage and possibly cache misses on CPUs with a low amount of cache (celeron for ex.). This optimization level is known to break some programs.


Kanske är bättre att du testar O2, kör det själv och tycker det flyter på bra. Less is more kan man nog säga.
Att kde tar tid att kompilera är inte så konstigt med tanke på hur mycket "bröte" som följer med.
_________________
Life, loathe it or ignore it, you can't like it.
Back to top
View user's profile Send private message
alu
n00b
n00b


Joined: 19 Apr 2004
Posts: 74
Location: Sweden

PostPosted: Thu May 18, 2006 9:29 pm    Post subject: Re: Optimerings fråga Reply with quote

Tänkte bara sticka in mitt huvud och säga att distcc är en väldigt bra ide att använda när man just kör svagare laptops.
Just om den hjälper vid KDE vet jag ej, men det kan kanske vara en ide att prova? :)
Back to top
View user's profile Send private message
cnistra
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2006
Posts: 78
Location: Göteborg, Sweden

PostPosted: Sat May 27, 2006 12:03 am    Post subject: Reply with quote

Testa att lägga till kdeenablefinal till din USE variabel i /etc/make.conf. Skall snabba upp kde kompileringen enligt beskrivningen.

Gör detta för läsa mera:
Code:
grep kdeenablefinal /usr/portage/profiles/use.desc
Back to top
View user's profile Send private message
mrcs
Tux's lil' helper
Tux's lil' helper


Joined: 10 Oct 2003
Posts: 137

PostPosted: Sun Jun 04, 2006 3:11 pm    Post subject: Reply with quote

Om du inte har testat det redan, så installera ccache och lägg till en ordentligt cache så brukar det gå lite fortare.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Scandinavian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum