Compiler Laufzeit

Deutschsprachiges X#-Forum – German language forum

Moderator: wriedmann

User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler Laufzeit

Post by Chris »

Hi Kai,

Sorry, my previous reply was out of sync! Replying to this post now:

Kai wrote: The .exe depends on a large . DLL with another 12945 entities and another 1000 constants. I added a screenshot to the attachments. It is interesting that the .dll file compiles in about 5 minutes, which is still far from a minute or less, but is significantly faster than 25 minutes of the .exe file.

Many of the constants from the .dll-file are used in the .exe file and are not redefined separately in the exe file's project. Could this be a problem because the compiler needs to find the constants in an external dll-file?
1000 constants should not be a problem. But what do you mean by constants, DEFINEs if I understand correctly?

Do you have a smaller library that you could send (if it''s not possible to send this large one)? Maybe a 50,000 or 100,000 line or so library that is ok to send, so we can try it in our machines and compare the compiling time in our machines, compared to yours? Just to make sure if it's something hardware related or it is a problem in the compiler.

Btw, so you are managing an app with close to a million lines of code in XIDE, that's nice to see!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Kai
Posts: 37
Joined: Fri Dec 15, 2017 10:43 am
Location: D

Compiler Laufzeit

Post by Kai »

Hi Chris!

I sent you an Email with some 100000 Lines of code at chris@xsharp.eu

The DLL file depends on some other DLL files. So a few more lines of code. :-)

Kai

Kai
User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler Laufzeit

Post by Chris »

Hi Kai,

Thanks for the files! This library actually consists of 270,000 lines (although a big portion is comments), and the time it takes to compile in my machines is....you will not believe it....7 seconds!!!

At first I thought there is some error and maybe some source files are being ignored by the compiler, but checked and re checked, the compiled dll seems good. This is with the subscribers version of the compiler, I will install back the public version to check also with it just in case, but I can't believe this will take more than 20 seconds either.

Can you please check the Performance tab of the Task Manager in your PC before hitting Compile? What's the % usage for the CPU, RAM and disk? If the CPU is already being used, or free memory is already very low, this could explain the very slow compiling times. Could it be there's an antivirus program eating up a lot of resources at the same time?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Compiler Laufzeit

Post by ic2 »

Hello Chris,
Chris wrote:and the time it takes to compile in my machines is....you will not believe it....7 seconds!!!
This is so fast that, anticipating on it, no doubt, Hollywood made a movie about it and Yousso N'Dour a song,
https://open.spotify.com/track/76D5nfZbYzZYfUZKGy73jy
https://www.imdb.com/title/tt0417395/

But that makes me wonder why Frank's brand new latest generation i7 Pc, with plenty of memory, fast SSD etc, still requires a full minute to compile the last program. It goes pretty quickly through the first 16 libs and then the rest of the time it is either busy with the last (largest) program or finishing up.

Dick
Kai
Posts: 37
Joined: Fri Dec 15, 2017 10:43 am
Location: D

Compiler Laufzeit

Post by Kai »

Hi Chris!

7 Seconds?? Incredible! Before I start compiling CPU is between 3 und 5 percent, RAM between 30 and 35 percent and Disk at 2 percent.
I think before we invest more work I try another computer. Maybe the antivirus programm or something else produces these problems.

Kai
User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler Laufzeit

Post by Chris »

Hi Dick,
ic2 wrote: But that makes me wonder why Frank's brand new latest generation i7 Pc, with plenty of memory, fast SSD etc, still requires a full minute to compile the last program. It goes pretty quickly through the first 16 libs and then the rest of the time it is either busy with the last (largest) program or finishing up.
Some of this time at least could be the overhead of MSBuild, which VS is always using when you compile your app/project/solution (XIDE calls the compiler directly). I have no idea what MSBuild does and is so slow, but in many cases I have noticed that it adds so much overhead before/after actually compiling that some times it is actually taking more time than the time needs to compile the code itself. You need to watch the output window while building, to see what is the actual time the X# compiler itself takes.

Or it could also be due to the specifics of the code of this project. This is why I asked Kai to send some of his code, it was very possible that something specific in it was causing the delay, because the compiler did not expect it. As it turned out, in this particular case there was no such problem, but it's possible there's some bottle neck with your code. Btw, what's the size of this project of yours in lines or kb?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Chris
Posts: 4922
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler Laufzeit

Post by Chris »

Hi Kai,
Kai wrote:
7 Seconds?? Incredible! Before I start compiling CPU is between 3 und 5 percent, RAM between 30 and 35 percent and Disk at 2 percent.
I think before we invest more work I try another computer. Maybe the antivirus programm or something else produces these problems.
I think that's the case. I just tried also with the public version just released (2.10): At the first time, it took 24 seconds to compile the library. At the second time and next ones, since the compiler process has now already initialized everything, it is taking 18 seconds each time.

Tested on i5-8400 @ 2.8GHz (6 cores), 8 GB RAM, SSD disk.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
hilberg.it
Posts: 75
Joined: Sun Sep 20, 2020 7:25 am
Location: Germany

Compiler Laufzeit

Post by hilberg.it »

Hi,
since X# 2.10 compile time decreased significantly! I am using Visual Studio 2019. Did anyone experience similar behavior?
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Compiler Laufzeit

Post by robert »

"Compile time decreased".
What do you mean?
Is is faster or slower ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
hilberg.it
Posts: 75
Joined: Sun Sep 20, 2020 7:25 am
Location: Germany

Compiler Laufzeit

Post by hilberg.it »

Sorry. I mean slower. I need to restart Visual Studio quite often. Don't know why this is happening now.
Post Reply