Slow compilation

Posts   
 
    
jeden
User
Posts: 5
Joined: 16-Oct-2007
# Posted on: 21-Nov-2007 04:47:19   

LLBLGen Pro 2.5 Final (Novembe5th, 2007) - Downloaded today C# CF.NET 2.0 & .NET 2.0 Template group: adapter OS: Vista 32 ultimate HW conf: Dual core duo 2.2, 2Gb RAM VS.NET 2005

Hello,

I'm evaluating LLBLGen Pro for a Windows Mobile order entry application, using Sql Server Mobile, but for development & testing purposes I'm currently using SQL Server Express.

I've noticed that each build of the solution takes about 2 minutes, even if I've only modified 1 line of code in one of my libraries, and also if I don't change the code and simply build the solution (note: build, not rebuild - in other words, using CTRL+Sh+B).

By separately building each project in the solution, trying to figure out what project is causing the slowness, I ended up finding the 2 projects generated by LLBLGen wasting about 90 to 120 seconds before actually starting compilation (VS.NET says "Build started..." in the status bar), and allocating 100% of CPU time (actually 50%, but I have a dual core, so 1 CPU is fully used). During this time, VS.NET seems frozen.

After the "Build started..." message disappears, it takes just a couple of seconds to complete compilation.

I tried generating the code for .NET 2.0 (not CF), but the result is the same.

Any suggestion?

Thanks Ant.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 21-Nov-2007 09:00:33   

mmm disappointed I have almost the same configuration as yours, but with a slower processor, and with 2 GB of RAM only.

And I've never faced a specific slowness problem regarding the compilation of LLBLGen Pro code.

How many entity do you have on your project? Are you using a large schema? You may try comiling the generated code using Command Line.

jeden
User
Posts: 5
Joined: 16-Oct-2007
# Posted on: 21-Nov-2007 15:03:23   

Walaa wrote:

mmm disappointed I have almost the same configuration as yours, but with a slower processor, and with 2 GB of RAM only.

And I've never faced a specific slowness problem regarding the compilation of LLBLGen Pro code.

How many entity do you have on your project? Are you using a large schema?

Hi,

thanks for your reply.

I have 38 tables in the db, so 38 entities. What I can't understand is why it takes so long if no compilation occurs.

For example, this is the output I have when I build the solution - with no changes at the code.

------ Build started: Project: Elapsus.IceEntry.System, Configuration: Debug Any CPU ------
Elapsus.IceEntry.System -> C:\Dev\Projects\AG Team\IceEntry\Dev\System\bin\Debug\Elapsus.IceEntry.System.dll
------ Build started: Project: Elapsus.IceEntry.Data.Base, Configuration: Debug Any CPU ------

==> Elapsus.IceEntry.Data.Base -> C:\Dev\Projects\AG Team\IceEntry\Dev\DataLayer.Base\DatabaseGeneric\bin\Debug\Elapsus.IceEntry.Data.Base.dll ------ Build started: Project: Elapsus.IceEntry.Data.BaseDBSpecific, Configuration: Debug Any CPU ------ ==> Elapsus.IceEntry.Data.BaseDBSpecific -> C:\Dev\Projects\AG Team\IceEntry\Dev\DataLayer.Base\DatabaseSpecific\bin\Debug\Elapsus.IceEntry.Data.BaseDBSpecific.dll ------ Build started: Project: Elapsus.IceEntry.System.IO, Configuration: Debug Any CPU ------ Elapsus.IceEntry.System.IO -> C:\Dev\Projects\AG Team\IceEntry\Dev\ImportExport\bin\Debug\Elapsus.IceEntry.System.IO.dll ------ Build started: Project: Elapsus.IceEntry.Test, Configuration: Debug Any CPU ------ Elapsus.IceEntry.Test -> C:\Dev\Projects\AG Team\IceEntry\Dev\TestSuite\bin\Debug\Elapsus.IceEntry.Test.dll ------ Build started: Project: IceEntry, Configuration: Debug Any CPU ------ IceEntry -> C:\Dev\Projects\AG Team\IceEntry\Dev\IceEntry\bin\Debug\IceEntry.exe ========== Build: 6 succeeded or up-to-date, 0 failed, 0 skipped ==========

The lines I've prefixed with ==> are where the time is wasted, with the status bar reporting "Build started..."

Walaa wrote:

You may try comiling the generated code using Command Line.

Now I think that the problem is not compilation - if there is no change to the code, there should be no compilation. I've made a new test: I've done a change in the DatabaseGeneric project, and built the project. Compilation is done almost 2 seconds, then I have to wait 1 to 2 minutes, with the prefixed line highlighted below and the status bar stating "Build in progress":

------ Build started: Project: Elapsus.IceEntry.Data.Base, Configuration: Debug Any CPU ------
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:P rompt /warn:4 /define:D EBUG;TRACE;CF;PocketPC /reference:C:\DevTools\SDK\WinCE\CF.NET\v2.0\WindowsCE\mscorlib.dll /reference:"C:\DevTools\IDE\LLBLGen Pro\RuntimeLibraries\DotNet20\SD.LLBLGen.Pro.ORMSupportClasses.CF20.dll" /reference:C:\DevTools\SDK\WinCE\CF.NET\v2.0\WindowsCE\System.Data.dll /reference:C:\DevTools\SDK\WinCE\CF.NET\v2.0\WindowsCE\System.dll /reference:C:\DevTools\SDK\WinCE\CF.NET\v2.0\WindowsCE\System.Xml.dll /debug+ /debug:full /filealign:512 /optimize- /out:o bj\Debug\Elapsus.IceEntry.Data.Base.dll /target:library DatabaseGeneric\HelperClasses\EntityCollection.cs DatabaseGeneric\AssemblyInfo.cs DatabaseGeneric\ConstantsEnums.cs DatabaseGeneric\HelperClasses\FieldInfoProvider.cs DatabaseGeneric\HelperClasses\TypeDefaultValue.cs DatabaseGeneric\HelperClasses\InheritanceInfoProvider.cs DatabaseGeneric\RelationClasses\LoadRelations.cs DatabaseGeneric\RelationClasses\PromotionRelations.cs DatabaseGeneric\RelationClasses\DiscountRelations.cs DatabaseGeneric\RelationClasses\ThreeWaysRoundRelations.cs DatabaseGeneric\RelationClasses\CheckRelations.cs DatabaseGeneric\RelationClasses\PaymentConditionRelations.cs DatabaseGeneric\RelationClasses\CustomerRelations.cs DatabaseGeneric\RelationClasses\OrderVatRelations.cs DatabaseGeneric\RelationClasses\AgentRelations.cs DatabaseGeneric\RelationClasses\DocumentTypeRelations.cs DatabaseGeneric\RelationClasses\EquipmentTypeRelations.cs DatabaseGeneric\RelationClasses\ProductFamilyRelations.cs DatabaseGeneric\RelationClasses\LineDiscountRelations.cs DatabaseGeneric\RelationClasses\ClosureDayRelations.cs DatabaseGeneric\RelationClasses\DiscountTypeRelations.cs DatabaseGeneric\RelationClasses\StatisticRelations.cs DatabaseGeneric\RelationClasses\SaleTypeRelations.cs DatabaseGeneric\RelationClasses\CustomProductListRelations.cs DatabaseGeneric\RelationClasses\ProductPriceRelations.cs DatabaseGeneric\RelationClasses\VisitFrequencyRelations.cs DatabaseGeneric\RelationClasses\ProductRelations.cs DatabaseGeneric\RelationClasses\OrderDetailRelations.cs DatabaseGeneric\RelationClasses\ProductLineRelations.cs DatabaseGeneric\RelationClasses\OrderDetailDiscountRelations.cs DatabaseGeneric\RelationClasses\ProductGroupRelations.cs DatabaseGeneric\RelationClasses\PaymentTypeRelations.cs DatabaseGeneric\RelationClasses\ProductMerchandiseRelations.cs DatabaseGeneric\RelationClasses\AssortmentRelations.cs DatabaseGeneric\RelationClasses\CutTypeRelations.cs DatabaseGeneric\RelationClasses\OutstandingRelations.cs DatabaseGeneric\RelationClasses\VisitDayRelations.cs DatabaseGeneric\RelationClasses\RentalRelations.cs DatabaseGeneric\RelationClasses\ActivityTypeRelations.cs DatabaseGeneric\RelationClasses\CustomerStatusRelations.cs DatabaseGeneric\RelationClasses\MeasureUnitRelations.cs DatabaseGeneric\RelationClasses\OrderMasterRelations.cs DatabaseGeneric\EntityClasses\CommonEntityBase.cs DatabaseGeneric\EntityClasses\LoadEntity.cs DatabaseGeneric\EntityClasses\PromotionEntity.cs DatabaseGeneric\EntityClasses\DiscountEntity.cs DatabaseGeneric\EntityClasses\ThreeWaysRoundEntity.cs DatabaseGeneric\EntityClasses\CheckEntity.cs DatabaseGeneric\EntityClasses\PaymentConditionEntity.cs DatabaseGeneric\EntityClasses\CustomerEntity.cs DatabaseGeneric\EntityClasses\OrderVatEntity.cs DatabaseGeneric\EntityClasses\AgentEntity.cs DatabaseGeneric\EntityClasses\DocumentTypeEntity.cs DatabaseGeneric\EntityClasses\EquipmentTypeEntity.cs DatabaseGeneric\EntityClasses\ProductFamilyEntity.cs DatabaseGeneric\EntityClasses\LineDiscountEntity.cs DatabaseGeneric\EntityClasses\ClosureDayEntity.cs DatabaseGeneric\EntityClasses\DiscountTypeEntity.cs DatabaseGeneric\EntityClasses\StatisticEntity.cs DatabaseGeneric\EntityClasses\SaleTypeEntity.cs DatabaseGeneric\EntityClasses\CustomProductListEntity.cs DatabaseGeneric\EntityClasses\ProductPriceEntity.cs DatabaseGeneric\EntityClasses\VisitFrequencyEntity.cs DatabaseGeneric\EntityClasses\ProductEntity.cs DatabaseGeneric\EntityClasses\OrderDetailEntity.cs DatabaseGeneric\EntityClasses\ProductLineEntity.cs DatabaseGeneric\EntityClasses\OrderDetailDiscountEntity.cs DatabaseGeneric\EntityClasses\ProductGroupEntity.cs DatabaseGeneric\EntityClasses\PaymentTypeEntity.cs DatabaseGeneric\EntityClasses\ProductMerchandiseEntity.cs DatabaseGeneric\EntityClasses\AssortmentEntity.cs DatabaseGeneric\EntityClasses\CutTypeEntity.cs DatabaseGeneric\EntityClasses\OutstandingEntity.cs DatabaseGeneric\EntityClasses\VisitDayEntity.cs DatabaseGeneric\EntityClasses\RentalEntity.cs DatabaseGeneric\EntityClasses\ActivityTypeEntity.cs DatabaseGeneric\EntityClasses\CustomerStatusEntity.cs DatabaseGeneric\EntityClasses\MeasureUnitEntity.cs DatabaseGeneric\EntityClasses\OrderMasterEntity.cs DatabaseGeneric\FactoryClasses\EntityFactories.cs DatabaseGeneric\FactoryClasses\EntityFieldFactory.cs DatabaseGeneric\FactoryClasses\EntityFieldsFactory.cs DatabaseGeneric\HelperClasses\ResultsetFields.cs DatabaseGeneric\HelperClasses\FieldCreationClasses.cs DatabaseGeneric\EntitySubClasses\MyCustomerEntity.cs DatabaseGeneric\EntitySubClasses\MyRentalEntity.cs DatabaseGeneric\EntitySubClasses\MyCutTypeEntity.cs DatabaseGeneric\EntitySubClasses\MyDiscountEntity.cs DatabaseGeneric\EntitySubClasses\MyDiscountTypeEntity.cs DatabaseGeneric\EntitySubClasses\MyProductMerchandiseEntity.cs DatabaseGeneric\EntitySubClasses\MyProductFamilyEntity.cs DatabaseGeneric\EntitySubClasses\MyVisitDayEntity.cs DatabaseGeneric\EntitySubClasses\MyThreeWaysRoundEntity.cs DatabaseGeneric\EntitySubClasses\MyLineDiscountEntity.cs DatabaseGeneric\EntitySubClasses\MySaleTypeEntity.cs DatabaseGeneric\EntitySubClasses\MyAssortmentEntity.cs DatabaseGeneric\EntitySubClasses\MyOrderVatEntity.cs DatabaseGeneric\EntitySubClasses\MyProductGroupEntity.cs DatabaseGeneric\EntitySubClasses\MyAgentEntity.cs DatabaseGeneric\EntitySubClasses\MyPromotionEntity.cs DatabaseGeneric\EntitySubClasses\MyProductLineEntity.cs DatabaseGeneric\EntitySubClasses\MyProductPriceEntity.cs DatabaseGeneric\EntitySubClasses\MyOrderMasterEntity.cs DatabaseGeneric\EntitySubClasses\MyPaymentConditionEntity.cs DatabaseGeneric\EntitySubClasses\MyOrderDetailEntity.cs DatabaseGeneric\EntitySubClasses\MyEquipmentTypeEntity.cs DatabaseGeneric\EntitySubClasses\MyStatisticEntity.cs DatabaseGeneric\EntitySubClasses\MyOutstandingEntity.cs DatabaseGeneric\EntitySubClasses\MyClosureDayEntity.cs DatabaseGeneric\EntitySubClasses\MyVisitFrequencyEntity.cs DatabaseGeneric\EntitySubClasses\MyLoadEntity.cs DatabaseGeneric\EntitySubClasses\MyActivityTypeEntity.cs DatabaseGeneric\EntitySubClasses\MyDocumentTypeEntity.cs DatabaseGeneric\EntitySubClasses\MyMeasureUnitEntity.cs DatabaseGeneric\EntitySubClasses\MyProductEntity.cs DatabaseGeneric\FactoryClasses\DerivedEntityFactories.cs DatabaseGeneric\EntitySubClasses\MyCheckEntity.cs DatabaseGeneric\EntitySubClasses\MyPaymentTypeEntity.cs DatabaseGeneric\EntitySubClasses\MyCustomProductListEntity.cs DatabaseGeneric\EntitySubClasses\MyCustomerStatusEntity.cs DatabaseGeneric\EntitySubClasses\MyOrderDetailDiscountEntity.cs

Compile complete -- 0 errors, 0 warnings

==> Elapsus.IceEntry.Data.Base -> C:\Dev\Projects\AG Team\IceEntry\Dev\DataLayer.Base\DatabaseGeneric\bin\Debug\Elapsus.IceEntry.Data.Base.dll ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 21-Nov-2007 16:40:42   

Are your builds deploying the app on an emulator or handheld? Can you reproduce this issue on another machine?

Do you have any pre or pot build actions specified? What if you tried a Release build instead of the debug?

jeden
User
Posts: 5
Joined: 16-Oct-2007
# Posted on: 21-Nov-2007 20:26:23   

Walaa wrote:

Are your builds deploying the app on an emulator or handheld? Can you reproduce this issue on another machine?

Do you have any pre or pot build actions specified? What if you tried a Release build instead of the debug?

At this moment I'm not deploying - just compiling and running some tests using NUnit. Anyway the target platform is hte emulator.

Also, I can't reproduce on another machine - I am out of my office, and I've got my laptop only.

No prebuilds or postbuilds specified.

I've tried with both debug and release - I also tried by changing the target platform from WM5 to PPC2003.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 22-Nov-2007 10:45:09   

I can't repro it, it builds fine here. What is slow though is the deployment of the compiled dll to the emulator. However the startup shouldn't be slow. We also haven't seen any reports of this kind. You say you can't repro it on another machine, this means: you have compiled the same solution there and it was OK?

You've installed VS.NET 2005 sp1 btw? If not, please do so, as it fixes a lot of bugs.

Frans Bouma | Lead developer LLBLGen Pro
jeden
User
Posts: 5
Joined: 16-Oct-2007
# Posted on: 23-Nov-2007 00:30:39   

Otis wrote:

I can't repro it, it builds fine here. What is slow though is the deployment of the compiled dll to the emulator.

As I said, there is no deployment - the emulator isn't even running.

Otis wrote:

However the startup shouldn't be slow. We also haven't seen any reports of this kind. You say you can't repro it on another machine, this means: you have compiled the same solution there and it was OK?

Sorry, I meant that at this moment I don't have any other PC to do tests with - in other words I haven't tried on other PCs

Otis wrote:

You've installed VS.NET 2005 sp1 btw? If not, please do so, as it fixes a lot of bugs.

Yes, I did. Anyway I tried reinstalling VS.NET and SP, but nothing has changed.

Anyway, I've just tried generating code from another database schema (fewer tables) and it looks like working with no delays. I tried to redo the entire code generation process for the db I have to use, and the result is I still experience delays. This leads me to believe that the problem is in the database (i.e. the tables I have created). In your opinion, is this possible? What if I provide you the 2 db files and you test my schema on your pc? Is it feasible? Of course, if the answer is yes, I'd prefer to send the file privately.

Thanks Ant.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 23-Nov-2007 09:53:23   

What if I provide you the 2 db files and you test my schema on your pc? Is it feasible? Of course, if the answer is yes, I'd prefer to send the file privately.

Of-Course, either create a thread in the HelpDesk Forum, or send an e-mail to support AT llblgen DOT com. Either way include a reference to this thread.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 23-Nov-2007 14:52:53   

I've received the .lgp file and the db files. I've used the .lgp file, the generated code (C#, adapter, CF2.0) compiled against the normal cf.net 2.0 assemblies. It takes roughly 10-11 seconds to compile everything, no delays.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 23-Nov-2007 15:50:44   

I've emailed you the code I used, perhaps you can use that in a different folder to see if that compiles fine or not.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 25-Nov-2007 11:44:48   

Continued via email.

Frans Bouma | Lead developer LLBLGen Pro
jeden
User
Posts: 5
Joined: 16-Oct-2007
# Posted on: 29-Dec-2008 16:25:10   

Hi,

a little late, I'm posting the reason why I experienced slow compilation and a solution.

I solved this issue months ago, but honestly I forgot to publish the solution here. Yesterday I had to reinstall Vista (fyi, I experienced the same issue on XP and Vista, VS 2005 and 200sunglasses , so I had to reapply the fix in order to reduce the build time.

The entity responsible of such slow build is the Platform Verification Task - by removing it from the build process compilation is done in a very reasonable time.

I've explained the solution in my blog at the following url:

http://www.developer-corner.com/Blogs/tabid/117/articleType/ArticleView/articleId/79/Platform-Verification-Task-leading-to-slow-builds-on-compact-framework-projects.aspx

Hope this helps anyone (if any!!) experiencing the same problem I had.

Antonio

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Dec-2008 16:30:26   

Thank you very much for the feedback, I'm sure this will help others who face the same issue.