Very long compilation time?

About Monkey 2 Forums Monkey 2 Programming Help Very long compilation time?

This topic contains 10 replies, has 6 voices, and was last updated by  Mark Sibly 9 months, 2 weeks ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #13856

    Yue
    Participant

    I’m not a programmer, but I’m worried about something I don’t know. When I come from Blitz3D, BlitzMax, and set my feet on Monkey2, I see that a simple program takes a long time to be compiled in Monkey 2 compared to the other engines, this is hopeless for me, and I would like to learn why this happens. Or if there is a configuration I’m ignoring.

    Kind regards.

    #13857

    abakobo
    Participant

    This is mainly due to the fact that gcc(mingw) is slow.
    Something else is that it compiles all modified files, so if you split well all your code in well structured files, you will gain compile time.
    The first two compiles are always slow though, so compiling demos just to see them will always take time. When you work on a project you don’t have the problem anymore.

    You can use MSVC as your compiler (by installing free msvc studio 2017 community). It’s way faster than gcc.
    Once installed you have to modify one/two parameters in env_windows.txt in bin dir:

    MX2_USE_MSVC=1
    and if you want 64bit exe (only available with msvc):
    MX2_ARCH_WINDOWS=x64

    #13858

    cocon
    Participant

    Yeah in some sense Blitz3D was “interpreted” language since the code turned into objects that run in the C++ engine. Blitzmax on the other hand was converted to assembly (fasm) so it would be considerably more optimized code rather than other high level source (such as C++). Monkey2 on the other hand is compiled as C++ source code.

    However is MSVC considerably faster than gcc? I havent tried it yet though but I am interested too in trying it.

    #13860

    Yue
    Participant

    Hi, I installed Visual Studio, however I have these bugs. Any suggestions?

     

     

     

    #13861

    Abe _King_
    Participant

    If I had to take a guess I believe that means you haven’t rebuilt your modules?

    @yue open the folder “scripts” in a command line then run “rebuildall2go”

    @cocon Yes MSVC is faster, marginally so, but its speed really only shines when recompiling – which is a time saver.

    #13862

    Yue
    Participant

    Hello, here’s the problem.

    #13863

    Abe _King_
    Participant

    @yue I still think it is missing your modules. Have you rebuilt all modules?

    scripts > rebuildall2go

    Edit: sorry,

    Well I am not certain anymore that is the case. I think other’s have had a problem with file access rights so that might be the cases here . . .

    #13864

    Yue
    Participant

    Yes. But the problem continues.

    Attachments:
    #13866

    Yue
    Participant

    Okay, this is working. And it is evident that the compilation time is much shorter.

    Thank you all for your help. 🙂

    #13868

    DruggedBunny
    Participant

    MSVC is definitely way faster, well worth the effort to set up if you’re on Windows!

    #13871

    Mark Sibly
    Keymaster

    What did you do to get it working?

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.