Blog

Angular Benchpress and Performance Tests

Ben Nadel wrote a blog post that explored the performance of rendering a large dataset using Angular (version one) and React. It was a good post and demonstrated the perceptible difference between an Angular 1 application and a React application.

The example application (found here) was intended to give a feel for this performance difference. In other words, does React feel faster than Angular?

But what if we could put actual numbers on this difference?

I’ve been playing around with the Angular2 Benchpress tool. Performance is critical to the Angular2 team. They didn’t have a tool that could collect performance information in an automated and repeatable fashion, so they built their own tool. Benchpress is the result.

We can use Benchpress to measure the actual performance of the application using Angular version 1, React, and just for good measure, Angular version 2.

Of course, Angular2 is still in early Alpha so there may be problems with the tool itself or some of my code, so take all of this with a healthy skepticism. Buyer beware.

Benchpress runs the tests multiple times and gives back average times and variances for a number of metrics, including memory and timings. These are the raw numbers I saw on my machine (Windows 8.1, 16GB memory):
[table]
Test,forcedGcAmount,forcedGcTime,gcAmount,gcTime,majorGcTime,renderTime,scriptTime
Angular v1,7293.41+-44%,49.62+-33%,41525.56+-1%,92.69+-2%,659.66+-1%,124.72+-1%,52.35+-1%
React,4661.45+-18%,25.29+-10%,13350.06+-0%,16.05+-5%,174.47+-5%,91.14+-2%,190.53+-5%
Angular v2,3545.39+-9%,53.67+-5%,17022.78+-0%,13.67+-3%,155.66+-4%,125.70+-1%,169.37+-4%
[/table]
This test measured mounting the grid, which basically measures the time to render repeated content on to the page.
You can see the formidable gap between Angular 1 and React. No surprise there. But you can also see that Angular2 is heading in the right direction. The great thing is that we can put actual numbers on performance rather than depending on our perception of the performance.

The project, along with the Benchpress tests can be found here:

Dave Baskin

View Comments

Recent Posts

How to Navigate Azure Governance

 Cloud management is difficult to do manually, especially if you work with multiple cloud…

6 days ago

Why Azure’s Scalability is Your Key to Business Growth & Efficiency

Azure’s scalable infrastructure is often cited as one of the primary reasons why it's the…

3 weeks ago

Unlocking the Power of AI in your Software Development Life Cycle (SDLC)

https://www.youtube.com/watch?v=wDzCN0d8SeA Watch our "Unlocking the Power of AI in your Software Development Life Cycle (SDLC)"…

1 month ago

The Role of FinOps in Accelerating Business Innovation

FinOps is a strategic approach to managing cloud costs. It combines financial management best practices…

1 month ago

Azure Kubernetes Security Best Practices

Using Kubernetes with Azure combines the power of Kubernetes container orchestration and the cloud capabilities…

2 months ago

Mastering Compliance: The Definitive Guide to Managed Compliance Services

In the intricate landscape of modern business, compliance is both a cornerstone of operational integrity…

2 months ago