Blog

Performance - Are network settings slowing down Power Apps?

It's useful to understand that the server infrastructure that Power Apps relies upon supports HTTP/2. Devices that fail to connect via HTTP/2 will perform more slowly. This post examines this behaviour in more detail.

HTTP/2 is a version of the Hypertext Transfer Protocol - the underlying network protocol that supports web traffic. HTTP/2 offers performance benefits over its predecessor, HTTP/1.1. These benefits include:

  • Reduced network traffic due to compression of HTTP header fields.
  • Multiplex support - that is, HTTP/2 is able to send multiple requests for data in parallel over a single TCP connection. 
  • Support for request prioritisation and server push (the ability for servers to send content to users before they’ve requested them).
  • Better flow control and error handling

The majority of Power Apps users take advantage of HTTP/2 and benefit from the above advantages. However, there are some cases where users cannot make HTTP/2 connections, and performance will suffer as a result. Where this most usually happens is:

  • Inside internal corporate networks, with proxies and routers that don't support HTTP/2.
  • Users that connect through VPNs that don't support HTTP/2
  • Users that use really old devices
In situations where we need to diagnose problems that relate to slow app performance or intermittent network connectivity, a good first step is to find out whether network connectivity is taking place over HTTP/2.

How to find out if Power Apps is using HTTP/2

The easiest way to find out if Power Apps is using HTTP/2 is to start the web browser "developer tools" and to monitor the network.

In Chromium Edge or Chrome, we can navigate to the 'Network' tab and inspect the 'protocol' column of the network requests. If HTTP/2 is enabled, we'll see entries with the protocol "h2".

What performance benefit would we expect over HTTP/1.1?

To give a rough, unscientific estimate of the difference between HTTP/1.1 and HTTP/2, I created a test app that connects to a SQL data source and collects 3,000 records.

I disabled HTTP/2 and ran the app. It took just under 30 seconds for the app to load completely and to reach a usable state.


When I repeated this with HTTP/2 enabled, this was reduced to around 21 seconds.


A notable highlight of this experiment is the effect of compression - "transferred" is equivalent to the total amount of uploaded and downloaded data and "resources" is the uncompressed size of all resources.

The "resources" size of this test app was 12.4MB. With HTTP/2, the data transfer size fell from 2.8MB to 422kB, which is a significant reduction.

Conclusion

When diagnosing performance or networking problems, particularly for users that connect from corporate networks or through VPNs, it can be very useful to inspect whether connections are taking place via HTTP/2. HTTP/2 offers some significant performance improvements over HTTP/1.1.