Difference in scale between mean page loading times and exponentially distributed page loading times? Apologies if this is the wrong place to ask.

For my experiment, I have a single-page application and a multi-page application. I am testing them with an exponential distributed delay throttling. The idea is that individual chunks are delayed by a random number sampled from an exponential distribution. So, when a HTTP/GET request comes in, it gets split into 200 byte chunks and each chunk is delayed. Basically each request for a resource e.g. HTML/CSS/JS is a sum of exponential distributed delays. 

Now, when I did a test of a 100 page loads and got the mean. 

My question is why is the SPA vs MPA without delay, SPA is around 4 times faster but then SPA vs MPA with delay is only 2 times faster?

No delay:


With delay:


Edit: The mean exponential parameter is 1 (second). The multi-page app total size transferred is significantly smaller (58KB), than single-page app (267KB) which due to the JavaScript framework, so it is expected to load faster. SPA also has more files to download, therefore more round-trips.

To do a simulation:


User visits a website from his browser, he makes a HTTP request for the root HTML first, which makes subsequent requests for style sheets and scripts to load the page.
Taking the first request for the root HTML, (for specific details) this TCP stream is fed into a SOCKS server before going out to the web server. The stream takes 200 byte chunks at a time and delays it, (and without blocking) keeps taking another chunk and delays it. It also checks if any previous chunk will overlap, if so it will send it out the same time.
The web server gets the delayed request and sends a reply back (in this case the HTML file) to the SOCKS server, where it will delay it again.


At step 2, say we have a 1000 byte stream, it will take 200 byte and delay it in the background, take another 200 byte and delay that in the background too, and keep doing it. Meanwhile it will check overlaps, so if the first chunk has a delay (plus current time) that is greater than the delay (plus current time) of the second, meaning the second will get sent first. We want to delay the second chunk the same time, so it gets sent in order.

I hope that makes sense. Please let me know if it doesn't.
The time to load a web application is a sum of multiple factors, including at least:


The round-trip latency to initiate a TCP connection to the server (or maybe multiple connections, depending on your application and your browser) -- also called RTT time.
The time to download all of the page and content that it causes to be downloaded.


The second factor depends on the amount of delay you're adding; the first doesn't.  Also, the multi-page application might cause more TCP connections, causing more of the first type of delay; but it downloads less data, so less of the second delay.

So there's no reason to expect things to scale as simply as you are expecting.  Instead, the resulting performance will be a more complicated function of page size, RTT time, and delay.

Heuristically, we can expect a RTT time of a few hundred milliseconds per TCP connection, though that will depend on how far the client is from the server.  You say there's an average delay of 1 second per 200 bytes downloaded, so for the single-page application, you expect 267KB / 200bytes = 1367 seconds of delay added, on average, due to your artificial delays; for the multi-page application, you expect 58KB / 200bytes = 297 seconds of delay added, on average.  Without the artificial delays, the time to download that much data might depend on the speed of your network.