this post was submitted on 28 Oct 2023
71 points (93.8% liked)

Asklemmy

42434 readers
1492 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_[email protected]~

founded 5 years ago
MODERATORS
71
submitted 8 months ago* (last edited 8 months ago) by illectrility to c/[email protected]
 

Why are so many mobile browsers at least 100, if not 200 megabytes in size? Even Firefox Focus which is supposed to be small and, you know, focussed is 85MB big.

The smallest browser I could find was the /e/ Foundation's built-in browser for /e/OS. It's 12MB.

It's kind of between Firefox and Focus in terms of features so why are all other browsers so big? Is there a small version of Firefox for Android?

Edit: I just looked up the /e/ Browser repo on their GitLab and the browser appears to be bigger than the 12MB displayed in App Info. It's about 70MB, so pretty comparable to the other browsers. I was so confused by the size difference but that's cleared up now.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] rockSlayer 22 points 8 months ago (7 children)

When it comes to software, complexity usually means one of 2 things: time complexity or space complexity. They have an inverse relationship, so if you want something fast you need more memory, and vice versa. In regards to browsers, that means either waiting forever to execute each op or using large amounts of storage/memory.

[โ€“] illectrility 3 points 8 months ago* (last edited 8 months ago) (5 children)

Yeah, of course a lot is cached and stored in user data ~~but I don't get why the app itself has to be so big. It's not significantly faster.~~

Edit: Never mind all that, I edited the post, the app size wasn't correctly shown.

[โ€“] rockSlayer 14 points 8 months ago* (last edited 8 months ago) (4 children)

Caching is separate. Honestly, I don't know how to explain it to you without giving you a college level explanation of time complexity.

Think about the most basic way to sort a list of arbitrary size; comparing the first item to the second item, swapping if the second item is smaller, and then repeating until no more swaps occur. This has a time complexity of O(n^2), so on a list of n size, it would be extremely cheap on memory (O(1)) but will take a very long time if n is large.

There's another sorting algorithm called quicksort that is much faster (how it works isn't very important atm), with a time complexity of O(nlog n). This is far faster than the other method of sorting, but it comes at the cost of needing a lot more memory to execute the algorithm, O(log n) of space.

If you scale this simple process to a multithreaded piece of software executing thousands of algorithms per second, like a browser, the size of n scales to the rest of the app. Browsers are generally written in C++, which requires memory to be preallocated. The size of the app includes this memory requirement, as well as the executable.

[โ€“] illectrility 4 points 8 months ago (1 children)

I understand, my confusion was caused by the misleading app size shown in App Info. It's actually like 70MB so my question is dumb. I'm sorry for wasting your time

[โ€“] rockSlayer 9 points 8 months ago (1 children)

it's not dumb, and you didn't waste my time! I love teaching computer science to people. Honestly, this was kinda fun. I haven't consciously thought about these concepts in about 6 years, so it was a good refresher for me too lol

[โ€“] illectrility 8 points 8 months ago

I'm glad to hear that, I had fun, too. Thank you for your time and have an amazing day, kind stranger

load more comments (2 replies)
load more comments (2 replies)
load more comments (3 replies)