Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28209 - dc-gui needs 512 MB RAM to compile..
Summary: dc-gui needs 512 MB RAM to compile..
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-08 13:18 UTC by Michal Januszewski (RETIRED)
Modified: 2003-09-13 14:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
interface.c splitter for dc-gui (split_interface.pl,3.80 KB, application/octet-stream)
2003-09-08 13:19 UTC, Michal Januszewski (RETIRED)
Details
interface.c splitter for dc-gui (faster) (split_interface_fast.pl,2.55 KB, application/octet-stream)
2003-09-08 13:21 UTC, Michal Januszewski (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Januszewski (RETIRED) gentoo-dev 2003-09-08 13:18:15 UTC
So far this hasn't been considered a bug (hey, it is after all pretty normal for
p2p GUIs to need 512 MB of RAM, now isn't it? ;>) but I think it definitely
should be. This crazy 512 MBs can be easily reduced to a much lower amount of
memory by splitting interface.c into a few smaller files. I have created two
Perl scripts that can do it - both attached to this bug entry. And here is the
additional code for dc-gui ebuild (just put it where appropriate):

  cp ${FILESDIR}/split_interface_fast.pl ${S}/src
  cd ${S}/src
  ./split_interface_fast.pl
  cd ${S}

I have tested this with 0.74 and 0.75 and had no problems with it.
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2003-09-08 13:19:45 UTC
Created attachment 17272 [details]
interface.c splitter for dc-gui

This version preserves local variables and is pretty slow.
Comment 2 Michal Januszewski (RETIRED) gentoo-dev 2003-09-08 13:21:34 UTC
Created attachment 17273 [details]
interface.c splitter for dc-gui (faster)

This is a hell lof faster than the previous version but it does make some local
variables global. It's ok because it doesn't break anything but in case people
don't like the idea - there is always the first version of the script..
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2003-09-09 02:12:01 UTC
do you have a swap partition active ?
Comment 4 Michal Januszewski (RETIRED) gentoo-dev 2003-09-09 06:09:13 UTC
Yes, I do. Without a swap partition it doesn't compile at all (I have 256 MB RAM).
Comment 5 SpanKY gentoo-dev 2003-09-09 08:08:52 UTC
imvho if a program uses more than 50 megs of ram to compile something is _very_ wrong
Comment 6 Michal Januszewski (RETIRED) gentoo-dev 2003-09-09 08:33:09 UTC
interface.c is wrong - it's a big, GLADE-generated file. That's why I wrote the script to split the biggest function in interface.c into smaller parts, so that gcc doesn't need 512 MB of memory to compile this.
Comment 7 SpanKY gentoo-dev 2003-09-13 14:07:39 UTC
added to cvs, thanks for the leet script ;)