It's both. Go look at your memory usage per tab and it's not uncommon to see hundreds of megabytes for a simple static 2d UI. The way web renders is extremely inefficient then you couple that with a language that has no regards for how a computer actually works and you get to the sad state we're in today.