Break the compiler into a compiler/linker
Break the compiler into a compiler/linker
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.
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.
-
- Enthusiast
- Posts: 469
- Joined: Sun Mar 16, 2008 9:18 am
Re: Break the compiler into a compiler/linker
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.

- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Re: Break the compiler into a compiler/linker
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.
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.
oh... and have a nice day.
Re: Break the compiler into a compiler/linker
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
The concept of modules solve many problems for large projects and advanced userFred wrote:The concept of linker and therefore modules is not easy to grap for beginners

An option for modules would be nice
Greetings
Thomas
Re: Break the compiler into a compiler/linker
Why not break it down into dll plugins instead then?
Re: Break the compiler into a compiler/linker
using a RamDisk would increase speed a lot.....
@fred : thats unfair, you are using a fast SSD
@fred : thats unfair, you are using a fast SSD

SPAMINATOR NR.1
Re: Break the compiler into a compiler/linker
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!
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...

Still, as nice as that feature would be, it is not absolutely crucial!

I may look like a mule, but I'm not a complete ass.
Re: Break the compiler into a compiler/linker
I was talking about my old single core Ahtlon 3000+ with regular diskRings wrote: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
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.
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.
-
- Enthusiast
- Posts: 443
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: Break the compiler into a compiler/linker
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
113000 lines... wow, that is impressive.
Sounds like a beastie.

I may look like a mule, but I'm not a complete ass.
Re: Break the compiler into a compiler/linker
Out of curiosity, what kind of a project is it and has it been easy to manage using PB?ozzie wrote:My project is in excess of 113000 lines and it compiles in about 4 seconds.
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: Break the compiler into a compiler/linker
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.
)
(Mac 2.8Ghz 2x 4-Core Xeon 6GB ram running Windows 7x64. But only one core will be doing the compiling.

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: Break the compiler into a compiler/linker
23000 lines for Purebreaker 3, and 1s compile time on this Pentium 4 2.8, 1.5GB