We’ve recently made two significant improvements to the AppHarbor build setup: ASP.NET view precompilation and more and bigger build servers. Read on for details on both.
ASP.NET view precompilation
We recently extended support for ASP.NET view precompilation. Previously, if an application project file specified view precompilation AppHarbor would build application views but view build-output was not included in the package that AppHarbor deploys. View compilation on AppHarbor gave the safety of knowing that views contain no syntax errors, but it did not improve application startup performance.
We have now changed our build handling to package the view build output with the rest of the app. For new apps, compiling views is on by default (you can toggle this in application settings). Properly precompiled views should make your app start much faster.
View precompilation on AppHarbor is a separate step from the rest of the build so if your project file specifies
MvcBuildViews and view compilation is specified for the app, views will get built twice. For that reason, we recommend setting
false for apps you’re deploying to AppHarbor.
Faster build servers
AppHarbor has grown significantly over the past year. If you’ve noticed increased build times it’s because our build infrastructure has been increasingly strained. In fact, until a few weeks ago, all builds were processed by a single server processing builds in sequence and it was beginning to show.
We launched AppHarbor with the promise to "deploy in 15 seconds, not 15 minutes". To stay true to that promise, we've now improved our build setup so that it can handle multiple builds simultaneously. We have also added additional and bigger build-servers and the built-in Git service runs on its own instance. This has the following advantages:
- Builds will rarely be queued for more than 3-5 seconds.
- Compilation is much faster (up to 60-70%) than on the old server
- The complimentary Git service is more reliable
The old build- and git-server is the oldest EC2 instance in the AppHarbor lineup and it's been with us since the very beginning when we had no money to buy fast instances. It previously hosted Git-repositories, ran builds and unit tests and held all AppHarbor SQL Server databases. It’ll soldier on for a time, running the Git-repositories that come with each application. But rest assured that it’s no longer slowing down your AppHarbor deploys.
We'll continue to optimize build times and improve application startup performance. We are also looking forward to new features in .NET 4.5 that'll let us further improve these aspects of AppHarbor. Until then we hope you'll enjoy the improved build process and give us any feedback you may have about how we can make it even better.
Image credit: Ciprian Popescu