Improve Compile Time / Speed up the Build

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
6/12/2009 3:26:13 PM
Gravatar
Total Posts 26

Improve Compile Time / Speed up the Build

Hello Joe,

My goal is to speed the compile time of the mojoPortal Solution (.sln). On my machine the first build takes ~25 seconds, and subsequent builds take ~12 seconds. Cutting this time in half, would be a dramatic change in development upon mojoPortal, because whether I make a change in my personal C# (Web) Projects in either ASPX or ASPX.CS, the code must be compiled to fire the post-Build events.

Question: Do you have suggestions to speed up build time (without upgrading hardware)?


Here is an option that I've considered:
Supposing that the following projects will not change:

  • mojoPortal.Data.*.csproj
  • mojoPortal.Features.Data.*.csproj
  • SiteOffice.Data.*.csproj
  • WebStore.Data.*.csproj

Steps: 1) Move their DLLs to a safe place so relevant projects can still reference them, and 2) Remove ALL 14 projects from the solution. I'm not sure how much of an increase in compile team performance this will be, but I'm willing to try it out.

Challenge: mojoPortal.Data.FirebirdSql.csproj, mojoPortal.Data.MSSQL.csproj, mojoPortal.Data.MySql.csproj, mojoPortal.Data.pgsql.csproj & mojoPortal.Data.SQLite.csproj all compile to the same DLL name (mojoPortal.Data.dll)! How does the solution not get confused and make sure that it's referencing the right DLL?


Thank you. I'd love to hear your thoughts and explanations regarding improving the build time and the multiple Data projects design.


thanks,
Michael

6/14/2009 8:45:57 AM
Gravatar
Total Posts 18439

Re: Improve Compile Time / Speed up the Build

Hi Michael,

Please in the future post questions about working with source code in the devleoper forum not the Installation forum.

Speeding up the build is in the grand scheme of things much less important to me than other things such as having a working solution that allows you to keep custom project code spearate from core code. 

There is no confusion about which data layer is used, The Data layer project used is always the one referenced by the Business layer project. The download .zip of source code and the svn trunk version are always referencing MS SQL unless you change the reference. If you are only using MS SQL you can copy the mojoportal.sln file and rename it then use your custom.sln file and remove the data layer projects for the data platforms you are not using, ie all of the Firebird, MySql, pgsql, SQLite projects can be removed from your solution. When I produce packages for other dbs I change those references on the business projects before building and the appropritate data dlls land in the Web/bin. The data layers are designed to have the same name across db platforms to make sure there can only be one data layer dll at a time in the Web/bin folder. In fact they all have the same namespaces and api and data layers are changed merely by changing which dlls are in the bin. I'm not going to change to dll references instead of project references because things are constantly added to the data layer projects. 

You can also remove the SiteOffice projects from your solution if not using them and probably you aren't since it is just prototype stuff at this point.

Hope it helps,

Joe

6/15/2009 11:10:47 AM
Gravatar
Total Posts 26

Re: Improve Compile Time / Speed up the Build

Thank you Joe,

Yes, I see that mojoPortal.Features.Business is referencing only mojoPortal.Features.Data.MSSQL.  This is helpful.

Thanks for telling me that SiteOffice is only prototype at the moment.

-Michael

You must sign in to post in the forums. This thread is closed to new posts.