threema-ch / threema-web

The Threema Web application.
GNU Affero General Public License v3.0
998 stars 107 forks source link

Improve speed/rendering of web.threema.ch #403

Open ovalseven8 opened 6 years ago

ovalseven8 commented 6 years ago

Usually, I delete all cookies and the cache when I close the browser window. Over the time, I have noticed that loading web.threema.ch in my browser takes quite a long time for a website, also subjectively perceived it takes longer compared to competitors like web.whatsapp.com.

So, today I compared the speed using an online tool. I cannot say something about the methods used by this tool, but nonetheless it confirms my feelings about the long rendering time.

Here you can find the report: https://www.dareboost.com/en/comparison/5a5b30e40cf2b528a72eaa86/5a5b30e40cf2b528a72eaa87/

Also a lot of things one can perhaps improve: https://www.dareboost.com/en/report/5a5b30e40cf2b528a72eaa87

Interesting here: The comparison between the total resource amount and the number of requests. WhatsApp is way more lightweight here.

dbrgn commented 6 years ago

Currently there is no concatenation of JS libraries being done. With HTTP 2 multiplexing, reducing the number of requests (to the same host) should not really make a noticeable speed difference, but at the same time has the disadvantage of invalidating the entire cache even if just one library was updated. Furthermore, right now a user could verify that a library was distributed unmodified from the npm distribution, while that isn't possible anymore once concatenated.

We might introduce concatenation/minification of all libraries in the future, but I'm not sure about it yet.

@ovalseven8 were these tests done with HTTP 1 or 2?

ovalseven8 commented 6 years ago

@ovalseven8 were these tests done with HTTP 1 or 2?

That's just an external testing tool I found, so I can't guarantee, but the test probably used http/2.0.

At least they say:

We have announced it a couple months ago: our web performance testing tool now fully supports HTTP/2 and our best practices repository has been updated to handle the particularities of this new protocol.

Source: https://blog.dareboost.com/en/2016/11/http2-changes-for-front-end-development/

rugk commented 6 years ago

Yeah just use http/2, I think others make no big difference than. But well … nobody verifies that by hand anyway.