Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: What is the deal with visual studio?

  1. #1

    What is the deal with visual studio?

    Currently I work at a compagny where I`m writting a new renderer for there inhouse game engine. The engine is being developed in C++ using visual studio. It has about 300 source files between 2 and 50 kb).

    When I started working there I had a temporary computer, an amd dual core 4800 with 1 gb of mem. Compiling and linking the entire engine took about 45 minutes! Now I have a new intel 6600 quadcore machine with 2 gb of mem and compiling still takes 30 minutes. We also use a program called incredibuild which let other computers aid you in compiling with there idle cpu time via the netwerk. This let`s you use up to 10 other pc`s. Linking is still done on the host machine. Even with this a complete build takes 12 minutes. And when in debug visual studio generates about 300 mb of files it uses for debug. ALso when linking, the process that does this comsumes over a gig of memory!

    When I compare this with my experience with delphi this is just insane. My own engine (+- 75 source files) compiles and links in 10 to 15 second in a cleaned workspace. Also I once worked on a large database application with about 200 sourcefiles and a complete build on a single machine took about 3 minutes. Memory usage of my Delphi 2007 is between 60 and 100 mb.

    Why does Visual studio needs so much power and resources? I asked this to a few seniors and none of them had any good awnser. They where even more amazed when I showed them compilation of my own engine project.

    Today I did a fun expirement by recording every minute I had to wait for compiling and linking. The total count was 52 minutes! 2 complete rebuild after SVN update and a lot of 3 minutes waiting periods for building the renderer, linking the dll and testing the changes.

    Can anyone shed any light on this?

  2. #2

    What is the deal with visual studio?

    I don't think it's just visual studio, it's just C++. Historically because Pascal is a stricter language you can produce a very efficient compiler, a C++ compiler has to be able to sort out all the weirdness of the language during compile time. But I think Visual studio is probably partly to blame, the Intelisense files it produces for code completion are just huge and while the VC4 was quite quick the more features they put into the language the longer it will take to compile.

    I use C# and C++ at work and it's a real shock to the system coming from a Delphi background. Us delphi programmers think nothing of doing a full rebuild, and a normal compile is just lightning fast, and I won't mention Syntax checking (which you don't get with C++) .

    One thing I have found the speeds up compile time is not to compile in the IDE and also make use of compressed folders for the project it cuts down the amount of work the hard drive will need to do as the object files are compressed before being written to disk .
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  3. #3

    What is the deal with visual studio?

    I can't shed any light on it.. but I can question the sanity of asking "Why is a Microsoft product being cruel and unusual to me?" :lol:

    To be fair to the MS devs, I'm sure there's a good reason behind it.. but I'll be damned if I know what it is. In my experience, MS C++ has always been slow to build.

    The build machine isn't running McAffee Crippleware is it?

  4. #4

    What is the deal with visual studio?

    I know lots of C++ programmers, and I can shed some light here.

    C++ is the problem, not Visual Studio. You can use any C++ compiler and encounter this exact problem. It's just wayyyyy slow.

  5. #5

    What is the deal with visual studio?

    yes, c++ is like, takes 30sec to compile something that takes 3sec on delphi

    -.-
    From brazil (:

    Pascal pownz!

  6. #6

    What is the deal with visual studio?

    technomage already answered your question; I would outline it this way:

    C (or even C++) is a very complicated language - not only to the programmer
    but to the compiler also. So any C++-compiler you will try (GCC and so on):
    They all will be incredible slow compared to Delphi.

    I don't know if "stricter" is the right word - C++ isn't loose but dealing with
    headers (not modules) produces an awful lot of overhead.
    Also Cs context-sensitive stuff requires lots of attention on either
    compiler and programmers side.

    BTW.: The fact that C++ is very complicated to the compiler makes it also
    impossible to produce a well optimized binary. So writing fast programs in C
    requires quite much skill and deep knowledge of your code.

    Lets face it: C was never designed for applications; but Stroustroup didn't understand that :roll:
    Pascal neither is designed for applications; but its good enough (credit goes mainly to Borland)

  7. #7

    What is the deal with visual studio?

    [Argh I was typing a large reply here but browser crashed]

    Essence: A wise guy once told me that the great difference in compile and link time is that pascal historically almost always has been using recursive descent parsers and because the language itself has stricter semantics

    I don't know if this actually holds true any longer, or that the answer simply is that the large c/c++ compilers have become too bloated or just optimizes alot more than other compilers. A compiler that springs to mind is TCC, Tiny C Compiler, that supposedly is 10 times faster than GCC
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  8. #8

    What is the deal with visual studio?

    something i like in C is += , -=,... we have Inc and Dec, very good, but they work only in ordinal =(

    i'm sure borland does not implement it to keep the code compatible or not?
    From brazil (:

    Pascal pownz!

  9. #9

    What is the deal with visual studio?

    arthurprs, just overload the inc and dec functions/operators

    On fpc you can also use a compiler switch to allow C style operators such as += and the like
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  10. #10

    What is the deal with visual studio?

    Quote Originally Posted by JSoftware
    arthurprs, just overload the inc and dec functions/operators

    On fpc you can also use a compiler switch to allow C style operators such as += and the like
    i already use them overloaded,

    but why don't borland add them on system.pas -.-'??
    From brazil (:

    Pascal pownz!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •