Compiler Laufzeit

Deutschsprachiges X#-Forum – German language forum

Moderator: wriedmann

TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

Compiler Laufzeit

Post by TerryB1 »

Hi Kai

FWIW and it is just a guess, something like this suggests to me that some of your code may have become duplicated in the transfer process leading to multiple compilations of the same thing.

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

Compiler Laufzeit

Post by Chris »

Hi Kai,

How many compiler warnings do you get after you compile? If they are several thousands, it's possible that the bottleneck is actually not the compiler, but the communication between the compiler and XIDE, transferring all those warnings. If that's the problem, we can find a solution quickly.

But I am not sure if that's indeed the problem. The most reliable way to debug this and find for sure what's causing it and fix it is to be able to test it in our machines. Would it be possible to zip and send me/Robert (or better post it in a file sharing service) the complete XIDE project? If it's a problem in XIDE, then it will be myself who will need to fix it, if it's due to the compiler that will be Robert or Nikos.
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 have less than 550 warnings. Most "The variable xxx is assigned but its value is never used."
I have fixed nearly all other warnings. When the exe-file is generated it is running fine.
I will test the Compiler in the next days on an other Hardware with mor RAM.

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

Compiler Laufzeit

Post by Chris »

Hi Kai,

Then most likely it's something very specific in your code that the compiler is not optimized form. Maybe a huge amount of defines, maybe globals, maybe extremely extensive use of UDC commands, maybe something else that I am not thinking about. Most probably it will be easy enough to fix/improve it in the compiler, but first we need to know what that is..

Could you also please select from the XIDE menu View-View Project Statistics and send a screenshot of the window that shows some info for your project? Maybe this could also give some idea..
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!

Here is a Screenshot with the project-statistics.

I am using nearly 1400 constants in this project and only the STD.UDC no other UDC-files.

Kai
Attachments
VO_UDC.jpg
VO_UDC.jpg (124.15 KiB) Viewed 626 times
ProjectStatistics.jpg
ProjectStatistics.jpg (107.52 KiB) Viewed 626 times
Kai
Posts: 37
Joined: Fri Dec 15, 2017 10:43 am
Location: D

Compiler Laufzeit

Post by Kai »

What do you think is a normal and acceptable compilation time for a project like this on a regular PC? It would be interesting information if I test it on another PC in the next few days.
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Compiler Laufzeit

Post by robert »

Kai,
I think over 600 files and over 300.000 source code lines is a quite large for a single application.
I would personally split the app up in some "core" code, some subsystems (reporting, data entry, system table maintenance etc) and a main app that brings this all together.
I know that this may be difficult due to dependencies between things, but in the long run this will make your app much easier to maintain.
To break the link between things you should consider to add some interfaces (these can be in the "core" code) and then implement these interfaces. Classes in the data entry then do not need to directly have access to reports for example, but they know about the IYourReport interface and can "communicate" with the reports through this interface.
And they can for example call YourShell:CreateReport() with the name or classname of a report and get an object back that implements IYourReport.

It will be a bit of work in the beginning but you will be rewarded with much faster edit-compile-test times.
And when applied properly it will also allow you to replace a single component when you find an issue.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler Laufzeit

Post by Chris »

Hi Kai,

In normal circumstances, it should take a minute or two at the very most. The largest single exe app I have (a standard VO-type app), is one with 180,000 lines of code and in the Public X# compiler version it takes 21 seconds to compile on my i5-8400 @ 2.8 GHz with 8 GB of memory and an SSD (but after making sure nothing else on my PC is using CPU or RAM). The compiler version that the subscribers get and which is usually around twice as fast, takes only 9 seconds to compile it on my machine.

So normally with your 430,000 line app, even the public version shouldn't take more than a minute or so. And that's if as Robert said this is a single app and it is not divided into dlls. It is not clear from the screenshot unfortunately, is this app indeed a single exe one, or do you have separate support dlls?
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!

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?

Kai
Attachments
project_statistics_dll.jpg
project_statistics_dll.jpg (96.46 KiB) Viewed 626 times
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Compiler Laufzeit

Post by Chris »

Ah, sorry, I looked at the screenshot more carefully and I see this is 400K+ lines for the exe alone. As Robert said, it would be a very good idea to divide this into at least 2-3 separate dlls, in order manage compiling small changes a lot better.

But still, it should take nowhere near 25 minutes to compile it normally. Maybe, as Wolfgang said, available RAM is the problem. Even if usage remains at 90% this might mean that the compiler all the time releases and allocates again memory blocks, maybe the OS swap parts to the disk etc, in order not to fill it up to 100%.

What about the libraries in your project? How large are they (in lines of code) and how much time does it take to compile each one of them?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply