39

GitHub - dominictarr/your-web-app-is-bloated: measuring memory usage of popular...

 5 years ago
source link: https://github.com/dominictarr/your-web-app-is-bloated
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

your web app is bloated

Using firefox's memory snapshot tool, I measured the heap usage of a variety of web apps. Here is how everything did.

App Memory (MiB = 10242 B) google inbox 215 (!!!) gmail (standard) 158 google sheets (spreadsheet) 96.98 slack 76.53 google-maps 65.61 youtube video 59.04 nytimes 56.08 facebook messenger 57.78 facebook newsfeed 56.12 riot 55.31 toggle 49.77 google docs (document) 46.57 soundcloud (track open) 45.80 hackmd (document) 44.9 reddit 43.77 airbnb 40.8 jitsi 40.21 tweetdeck 40.38 the onion 38.30 rocketchat 32.12 open collective 31.22 youtube 30.00 sandstorm (spreadsheet) 27.63 pinterest 26.80 images.google (result) 26.41 twitter 25.09 google docs 24.7 facebook 23.49 soundcloud 22 medium 18.53 medium (article) 17.99 bandcamp 14.86 google results 14.77 patchless 12.43 google 11.30 google hangouts 10.76 talky 9.40 bandcamp (album page) 8.76 dat-shopping-list 8.28 the guardian 7.36 duckduckgo images (result) 7.31 github 7.41 openstreetmap (on new york, transportation layer) 6.72 wikipedia page 5.93 duckduckgo 5.63 meatspace chat 4.48 duckduckgo results 4.81 stackoverflow 2.55 wikipedia 1.73 gmail (vintage) 0.81

Method

I opened each site in firefox, and used the memory shapshot tool. I screen shotted the output using scrot. I was running ublock, and that probably made some sites smaller.

twitter - 25.09 MB

loaded twitter homepage and didn't scroll or touch anything

memory-snapshot

tweetdeck - 40.38 MB

twitter power user interface, with mentions and messages, one user's feed, and a search feed added.

memory-snapshot

github - 7.41 MB

github homepage (my news feed)

memory-snapshot

google - 11.30 MB

empty google page. A surprising amount of memory used since it shows nothing but a single field.

memory-snapshot

google results - 14.77 MB

prehaps still a lot of memory considering very little images or real time interactions here.

memory-snapshot

duckduckgo - 5.63 MB

much less memory than google! I guess it's the tracking features in google that uses the extra memory!

memory-snapshot

duckduckgo results - 4.81 MB

memory-snapshot

reddit - 43.77 MB

the reddit homepage has an infinite scroller, usually means lots of javascript and js objects.

memory-snapshot

wikipedia - 1.73 MB

memory-snapshot

wikipedia (article) - 5.93 MB

static page with some images

memory-snapshot

youtube - 30.00 MB

pretty light weight considering it's youtube

memory-snapshot

youtube (video) - 59.04 MB

I think if you need more memory than this and don't play videos there is something wrong.

memory-snapshot

google-maps - 65.61 MB

I've noticed google-maps being quite heavy, and it's more than a video. but should it be?

memory-snapshot

openstreetmap - 6.72 MB

only 10% the memory of google maps and does essentially the same thing!

on new york, with transportation layer enabled

memory-snapshot

stackoverflow - 2.55 MB

static site

memory-snapshot

facebook - 23.49 MB

just the login page! already a lot of javascript has been loaded. The most bloated landing page, twice as much as google, 10x wikipedia.

memory-snapshot

facebook newsfeed - 56.12 MB

a lot of objects are in memory, presumably this is from using react.

memory-snapshot

google images (result) - 26.41 MB

fairly efficient, compared to reddit, youtube etc

memory-snapshot

duckduckgo images (result) - 7.31 MB

1/3 the memory google images uses

memory-snapshot

pinterest - 26.80 MB

about the same as google images

memory-snapshot

gmail (basic) - 0.81 MB

nearly nothing! I use this daily. Really, it's an amazing level of functionality and user-friendlyness, packed into a very simple interface. Also, because it doesn't have any kind of dynamic updates, it's less distracting than the other email interfaces. You have to intentionally check for emails, there is no notifications or changing favicons. so ugly it's beautiful.

memory-snapshot

gmail (standard) - 158 MB

amazingly bloated. mostly massive amounts of javascript (it has a progress bar that shows at startup) but just the JS objects are 37 mb.

memory-snapshot

google inbox - 215 MB (!!!)

makes standard gmail look tame. did they take gmail standard and just add more stuff?

memory-snapshot

google docs - 24.7 MB

memory-snapshot

google docs (document) - 46.57 MB

this seems like more than should be necessary. mainly js objects.

memory-snapshot

google sheets (spreadsheet) - 96.98 MB

a lot of memory, especially considering spreadsheets were the killer app back in the apple 2 days, where lots of people brought computers for the first time to run visicalc on 64k of memory?

memory-snapshot

hackmd (document) - 44.9 MB

about the same as a google doc

memory-snapshot

sandstorm (spreadsheet) - 27.63 MB

almost 1/4 that of google spreadsheets.

memory-snapshot

toggl - 49.77 MB

time tracking software, quite bloated.

memory-snapshot

nytimes - 56.08 MB

very bloated.

memory-snapshot

the guardian - 7.36 MB

pretty good.

memory-snapshot

the onion - 38.30 MB

quite bloated, nearly as much as reddit, but is created entirely by their in-house writers.

memory-snapshot

open collective - 31.22 MB

react site, but it's not data that changes very often. pretty bloated.

memory-snapshot

medium - 18.53 MB

could be better, but not as bad as others.

memory-snapshot

medium (article) - 17.99 MB

memory-snapshot

soundcloud - 22 MB

better than youtube

memory-snapshot

soundcloud (track open) - 45.80 MB

better than youtube

memory-snapshot

bandcamp - 14.86 MB

front page has listings, memory use similar to google search results. the best content site.

memory-snapshot

bandcamp (album page) - 8.76 MB

pretty tight!

memory-snapshot

slack - 76.53 MB

bloated! largely javascript.

memory-snapshot

rocketchat - 32.12 MB

does the same thing as slack, but with less javascript. rocketchat is mostly js objects, but still less than slack.

memory-snapshot

riot - 55.31 MB

more js objects than slack, but less javascript.

memory-snapshot

talky - 9.40 MB

started a call with no one else in it. pretty tight!

memory-snapshot

google hangouts - 10.76 MB

on a call by my self. also surprisingly unbloated!

memory-snapshot

jitsi - 40.21 MB

4x google hangouts.

memory-snapshot

meatspace chat - 4.48 MB

as tight as a static site, but does crazy javascript stuff!

memory-snapshot

facebook messenger - 57.78 MB

same memory use as fb news feed. react, of course.

memory-snapshot

airbnb - 40.8 MB

Searched for "san francisco". A lot of memory used to just display a list, especially considering there is no map displayed. Smells like react.

memory-snapshot

patchless - 12.43 MB

A social p2p client with heavy javascript, including infinite scrollers!

memory-snapshot

dat-shopping-list - 8.28 MB

simple shopping list app on dat

memory-snapshot

conclusions

I started exploring this because I was trying to figure out how to optimize my own apps. Memory use isn't the most important thing, but it is an easy to measure proxy. If you have less memory usage, you probably have a simpler app, which is probably more performant. Less memory also means lees garbage collection activity.

Recently, web development style has moved towards a fully dynamic front end that generates everything in javascript. If a app really is highly dynamic, I guess that is somewhat excusable, (such as facebook or slack) but I on a site that could be static it obviously uses a lot more.

I think this just shows there is considerable room for improvement in terms of application efficientcy.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK