Page 1 of 2
Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 8:21 am
by Mistrel
Recompiling very large projects in PB can take several minutes (10-15 on my laptop). The ability to compile separate source files into objects like C/C++ would make compile times much, much faster.
It does complicate the compile process but it is a logical step and improvement. It will help managing projects with a lot of source files where the majority of the code doesn't need to be updated.
Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 8:57 am
by UserOfPure
10 minutes to compile a project? Can you post some stats on your laptop (CPU, RAM, etc), and also what your project is made up of, ie. number of source files and how many lines in each, and what included data, and so on. Because 10 mins seems far too long. You must have a mammoth project happening, like the source of Windows 7.

Also, how long does the same project take to compile on a desktop PC? Maybe your laptop is the cause of the slow speed.
Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 9:23 am
by Kaeru Gaman
I would strongly discourage this request, until it would be an additional option wich is default off!
the hit-and-run feeling of PureBasic, simply press F5 and see what you created, is a very strong argument for beginners to chose this language.
development environments with seperated compiler and linker are only for professionals.
neither beginners nor hobby proggers will feel comfortable with it.
I wouldn't - and I'm a hobby progger for over 25 years now.
Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 9:42 am
by Fred
10 minutes ? The IDE compiles in seconds here (70.000 lines). The concept of linker and therefore modules is not easy to grap for beginners and we don't want to step in this direction.
Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 9:56 am
by ts-soft
Fred wrote:The concept of linker and therefore modules is not easy to grap for beginners
The concept of modules solve many problems for large projects and advanced user

(not for speed reason)
An option for modules would be nice
Greetings
Thomas
Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 10:10 am
by Foz
Why not break it down into dll plugins instead then?
Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 10:56 am
by Rings
using a RamDisk would increase speed a lot.....
@fred : thats unfair, you are using a fast SSD

Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 11:55 am
by srod
Arctic Reports > 50000 lines of code, umpteen source files (more than 40); compiles in seconds here! Mistrel, how many files does this project of yours have?
As for modules compiling to individual object files... that would be a great addition yes. Drop a precompiled object file into a project and have it automatically linked in with the resulting exe...

Could this not exist side by side with the existing arrangements?
Still, as nice as that feature would be, it is not absolutely crucial!

Re: Break the compiler into a compiler/linker
Posted: Wed Jan 13, 2010 12:26 pm
by Fred
Rings wrote:using a RamDisk would increase speed a lot.....
@fred : thats unfair, you are using a fast SSD

I was talking about my old single core Ahtlon 3000+ with regular disk

Re: Break the compiler into a compiler/linker
Posted: Thu Jan 14, 2010 4:56 am
by Mistrel
Sorry for the lack of detail. I wasn't clear in my first post about what I was actually doing and have subsequently mixed in some misinformation as well as my thoughts and intentions got jumbled.
I started to talk about the compiler/linker part and then thought about how long it takes me to compile PureGDK, without realizing I was mixing up PureBasic and TailBite. PureGDK is comprised of about 60 TailBite libraries, three DLLs, and some other miscellaneous tools. Only a small portion is actually compiled fully by PureBasic.
The comparison doesn't make sense because I'm not really compiling with PB.
My original thought stems from my using C++ more and more in my general work. I manage all of my projects, libraries, and dependencies using a combination of UNIX Bash and GNU Make. When projects start to get really big or just complicated I start abstracting things and put them in their own source files, to be compiled to their own object files which are then only updated if the source changes.
Managing a larger project compiled to individual objects just makes more sense to me; which why I requested this.
And for those of you who are wondering, my primary development environment is my laptop which is a 1.4Ghz Core 2 Solo with 4GB of memory. It's noticably slower at compiling than anything else I own. But the 8 hour battery makes up for it in spades.
Re: Break the compiler into a compiler/linker
Posted: Thu Jan 14, 2010 7:19 am
by ozzie
I also wouldn't want the complication of a separate linker. My project is in excess of 113000 lines and it compiles in about 4 seconds. That's with an Intel Core 2, 2.10GHz, 1Gb RAM, running XP under Parallels on an Apple iMac.
Re: Break the compiler into a compiler/linker
Posted: Thu Jan 14, 2010 11:32 am
by srod
113000 lines... wow, that is impressive.

Sounds like a beastie.
Re: Break the compiler into a compiler/linker
Posted: Thu Jan 14, 2010 11:39 am
by eesau
ozzie wrote:My project is in excess of 113000 lines and it compiles in about 4 seconds.
Out of curiosity, what kind of a project is it and has it been easy to manage using PB?
Re: Break the compiler into a compiler/linker
Posted: Thu Jan 14, 2010 4:22 pm
by DoubleDutch
40,000+ lines 1 second or so to compile.
(Mac 2.8Ghz 2x 4-Core Xeon 6GB ram running Windows 7x64. But only one core will be doing the compiling.

)
Re: Break the compiler into a compiler/linker
Posted: Thu Jan 14, 2010 5:30 pm
by djes
23000 lines for Purebreaker 3, and 1s compile time on this Pentium 4 2.8, 1.5GB