Hi, I'm trying out Lagrange and geminispace in general. I love the sleek minimalism and snappiness of Lagrange, but then I had a look at the Activity Monitor (on MacOS 10.15)... and Lagrange is using more memory (700mb) than Firefox (500mb), which is crazy. Is this normal? I would expect the 'smolweb' be, well, smol in memory consumption as well.
Dec 14 · 3 days ago · 👍 bsj38381
14 Comments ↓
Lagrange takes very little memory, at least for my windows 11 laptop. Maybe anohter program is running on your MacOS, I'm not sure.
I'm running Lagrange and Brave now on up to date Fedora and it's 93 comparing to 210 mb.
edit. ~~deleted~~
edit 2 19:23. skyjake is right
Assuming completely default settings, Lagrange's memory use on macOS is likely dominated by buffers for drawing the document. For example, if I make the window as small as possible, my memory use goes to ~250 MB, while making it fullscreen (on a 13" Retina screen) it goes to 400 MB. How's your display situation?
The reason for that memory use is hardware-accelerated custom GUI rendering, basically.
Loading a lot of fontpacks also increases memory consumption.
As to the actual content, you can see how much that takes in "about:debug". It should be a few megabytes, depending on your memory cache settings and whether there are images stored in memory.
@skyjake I'm on Android, but it's using 49 megabytes of ram. What could the reason for this be? I only have a couple font packs installed. I guess they could just be large ones, but I still wonder.
@The_Jackal I'm sorry, what is using 49 MB? The entire app or the content cache? In either case that sounds like a very reasonable amount of memory use.
Even though the rendering is done the same way on all platforms, there are still platform-specific differences, I suppose due to how and to what the memory usage is attributed. For example, on Windows, changing the window dimensions has little effect on the reported memory use even though the same sizable draw buffers are allocated, just like on macOS.
my android debug screen shows 5MB with 4 tabs
@skyjake Ah, sorry for not being clear. I meant the app. It shows how much ram bring used was cleared when I closed an app and with no other apps open, it would say 49mb had been cleared when closing Lagrange, even when it had nothing like any other tabs open. That's good to hear if there's nothing wrong though.
Must be a GPU without dedicated memory for those hundreds of megs. On my desktop I get only around 60 in RAM but 400 in dedicated VRAM, with 2558x1415 window. I suppose conventional browsers are not so eager with the GPU textures compared to state of the art gamer tech Lagrange GPU powered engine :P That said the way I use them they rarely take up less than 10GB of RAM, and I reutinely restart them when they inevitably push everything else into swap and bring the whole system to its knees.
700MB is insane, I'm getting ~100MB
2558x1415x4=14,478,280... Add a texture with fonts, and it's still better than 40x less than 700MB... even with a few thousand bookmarks and buffered gemini pages.
I would not simply disrespect font textures like that, but yeah I don't see either why screen size should matter that much. I played around resizing the window back and forth like mad, and the VRAM usage kept increasing untill 3Gish (87%ish) amd then the resizing started lagging a bit, so seems like someone somewhere is delaying releasing video memory untill it become unavoidable... I was wondering why dmc5 started lagging recently, makes sense now.
Also the whole point of a GPU is that you don't need a screen buffer...
Okay yeah, I see now from about:debug that Lagrange's total memory usage is a measly 0.371 MB, but according to the OS it's using (or has reserved? I don't know how MacOS memory management works) 181,7MB. This is after freshly launching Lagrange with a few tabs open, all text. I guess my OS is being wonky, then?
Re: GPU discussion, this is an old iMac with a NVIDIA GeForce GTX 660M, 512 MB VRAM. I don't know how to check if Lagrange is using that.
On my Linux box Firefox uses gigabytes. I think latest thinking is that unused memory is wasted memory and it's the coder's privilege and responsibility to come up with some way to use it all up.