Running an application from IDE in VS much slower than in VO
Posted: Sat Jul 23, 2022 6:05 am
Hi to all (and specially directed to Dick),
following what Dick posted in the comments about the much longer time needed to start an (xported) application from Visual Studio than from VO, I have selected this form to explain the "why" and "how to fix".
First of all, VO comes from a time when computers were really slow, and therefore the architects of VO decided to build the IDE on a database (the repository) with dependency managment on the entity level (i.e. a method, function, constant etc) when nearly all others, including the Xbase world, Microsoft, Borland and the entire *x world were using much simpler text files to store code.
It took many years (until Robert fixed it definitely) to make that repository stable, and many people has lost code because of database instabilities.
This approach led to very short build - run cycles, and contrarily to the trends to short and many files in the rest of the development world, the repository led us build gigantic classes and loooong methods, and even worser, monolithic applications with executable sizes over 50 MB.
Unfortunately VO and its repository based development approach remained a niche product (this is not the correct place to speak about the "why"), and to give uns a way into the future, GrafX and later the X# team was forced to give up this approach and turn to a file based model.
Unfortunately, Microsoft with its C# and VB.NET compilers had to give up the incremental building process of Visual C++ (again a choice I would not like to discuss about), and use a full build model, maybe because with SSDs, much memory and fast processors that seemed not be important.
So, if whe combine our typical VO development style with these changed environment, we will understand what the price is: much longer build - run cycles, because the compiler needs to rebuild the entire application every time, and not only the (few) changed entities.
The culprit of these long times is not the X# development team, nor a slow compiler, but our old development style.
So, if you are porting a VO application to X#, break it up into smaller libraries and, if possible, a small executable.
My WPF applications are built by small libraries and relative small executables, and even if they don't reach the code volume and complexity of my VO applications, they have relatively short build - run cycles, normaly about 20-30 seconds (ok, that is longer than in VO, but I can live with that).
So, to move forward with an xported VO application, it would be a good idea to break it up, and move the base libraries to a different project. Your development speed will increase, and combined with the powerful .NET framework libraries you will need much less code.
Wolfgang
P.S. of course, whe can discuss this here - and this is why I opened it in the Chit-Chat section and don't opened a follow-up in the comments
following what Dick posted in the comments about the much longer time needed to start an (xported) application from Visual Studio than from VO, I have selected this form to explain the "why" and "how to fix".
First of all, VO comes from a time when computers were really slow, and therefore the architects of VO decided to build the IDE on a database (the repository) with dependency managment on the entity level (i.e. a method, function, constant etc) when nearly all others, including the Xbase world, Microsoft, Borland and the entire *x world were using much simpler text files to store code.
It took many years (until Robert fixed it definitely) to make that repository stable, and many people has lost code because of database instabilities.
This approach led to very short build - run cycles, and contrarily to the trends to short and many files in the rest of the development world, the repository led us build gigantic classes and loooong methods, and even worser, monolithic applications with executable sizes over 50 MB.
Unfortunately VO and its repository based development approach remained a niche product (this is not the correct place to speak about the "why"), and to give uns a way into the future, GrafX and later the X# team was forced to give up this approach and turn to a file based model.
Unfortunately, Microsoft with its C# and VB.NET compilers had to give up the incremental building process of Visual C++ (again a choice I would not like to discuss about), and use a full build model, maybe because with SSDs, much memory and fast processors that seemed not be important.
So, if whe combine our typical VO development style with these changed environment, we will understand what the price is: much longer build - run cycles, because the compiler needs to rebuild the entire application every time, and not only the (few) changed entities.
The culprit of these long times is not the X# development team, nor a slow compiler, but our old development style.
So, if you are porting a VO application to X#, break it up into smaller libraries and, if possible, a small executable.
My WPF applications are built by small libraries and relative small executables, and even if they don't reach the code volume and complexity of my VO applications, they have relatively short build - run cycles, normaly about 20-30 seconds (ok, that is longer than in VO, but I can live with that).
So, to move forward with an xported VO application, it would be a good idea to break it up, and move the base libraries to a different project. Your development speed will increase, and combined with the powerful .NET framework libraries you will need much less code.
Wolfgang
P.S. of course, whe can discuss this here - and this is why I opened it in the Chit-Chat section and don't opened a follow-up in the comments