3D View: potree stops working in Firefox on M1 Mac

Hello Everyone.

I did a few scans lately and the scanning really went great! I get the results exactly as I wish them. Then when I start to view the 3d model over potree (I choose «view 3D model» from the WebODM user interface) I can browse and view the model to a certain point when suddenly firefox stops (it does not respond anymore).
During use, Firefox uses more and more RAM until 7.5GB is reached. At this point it freezes. I run it on an M1 Mac (it has 64gigs of physical ram - I reserved variable amounts for docker - tried between 30 and 50gb with no difference).

Any suggestions? Any help is highly appreciated!
Thanks & Best Regards
elkooo

1 Like

Welcome!

Sorry for the trouble!

Are you able to allocate something like 32GB to Docker, 4GB SWAP, and more disk space, restart the machine, and try again?

1 Like

I already tried various setups in docker, still Firefox tends to fill memory up to 7.5gb.

The 3D View runs super smooth up to the point, when Firefox uses 7.5GB of memory. Also, it doesn’t seem to happen, as long as I don’t use the dimensioning tool in potree… as soon as I draw a few measurement lines, RAM gets eaten up by Firefox…

Also, docker doesn’t seem to listen to the memory restrictions i give it… uses 50gb despite the limitation of 35gb I gave it…

1 Like

To be clear, you’ve restarted Docker and your host after the change of settings, right?

1 Like

Thank you Saijin_Naib for your help!
I restarted Docker but it seems only a complete restart of my Macbook did the trick with the new setup. However, this made no difference in behaviour: Firefox freezes after a certain time - even when I don’t browse or edit the 3D View. It fills it’s memory up to around 7.5GB (this time 7.43GB) and then stops working.

If I force-quit Firefox, I can imediately log in again and it works like a charme again, until the memory limit of ~7.5GB is reached again… and it freezes again.

It seems only to happen if I use dimensions within a 3D Model. The RAM usage stays low as long as I only view/browse the 3D Model…

edit: it seems, it doesn’t happen with Safari… or at least so far not. Needs more testing though. I use Firefox 107.0 (64-bit) and MacOS Ventura 13.0.1 - Safari is V16.1

1 Like

I wonder if the Firefox for ARM release has a memory usage limitation… Odd.

Can you try Microsoft Edge and/or Google Chrome as well, since those are both Chromium-based browsers?

Safari seems to consume a lot less RAM for the same 3D Model. I had peak usage of ~3GB while Firefox got stuck with ~7.5GB. Anyways - seems to me that this amount of RAM is alot simply for viewing 3D files. My CAD Software I am used to isn’t nearly as RAM hungry as this tool seems to be. Furthermore, there seems to be a bug anywhere since with Firefox, RAM gets filled continuously even if I don’t manipulate anything at all - just with time. This doesn’t seem right.

Concerning Chrome / Edge: I don’t really like to have Google/Microsoft Apps on my machine - so at the moment, I will not install any of those…

Any browser based 3D viewer isn’t going to be as performant or as optimized as a desktop app. If you want to view these models in another tool to reduce RAM usage, you can do that. Unfortunately, we don’t have much control over how the browser handles things, and to be fair to the folks writing browsers, browsers are expected to do some pretty silly things these days, like viewing the 3D models we create in OpenDroneMap. :smiley:

2 Likes

@smathermather of course you are right - a browser has to cover a lot of tasks. But in a more and more AR & VR related time, I think we will see loads of 3D tasks that will be viewed in browsers.

However: There seems to be an issue flooding the RAM in firefox. It is simply not logical, that a 3D viewer fills 7.5GB of RAM just sitting (it does this, even if I just open a 3D model and let it sit for a few minutes). This shouldn’t happen and doesnt (or not nearly as fast) in safari…

1 Like

Have you had a chance to report the issue upstream to Mozilla/Firefox?

No. I have no idea, where I should do this… but I am not sure If this is a Firefox problem or a potree problem. Perhaps this should be adressed by the Dev-Team of webODM first?

It’s not a bug, and it sounds like Firefox is using twice the memory of safari, so it would be useful to upstream to them.

That said, it is a legitimate feature request to reduce the memory footprint of models in-browser. Maybe you can add some color to the discussion here:

1 Like

I don’t think it «uses» the ram really. It tends to fill it with time and not clear it again. I will test further, if it also happens with safari. As mentioned, it only does it, when I draw multiple dimension lines with the dimension tool… otherwise I can view, scroll and pan just fine, even if I set the point budget to maximum…
Did anyone try to reproduce this?

Gotcha. If it grows with time, that does sound like a memory leak, and indeed, I assumed you were running into trouble when loading meshes, not measuring on point clouds (and thus that issue I linked to isn’t relevant). Sorry for the misread: I read all the issues on the forum every day, but sometimes I lose the thread :smiley: . Unfortunately, I haven’t seen this behavior and don’t have an M1 Mac to replicate, but likely someone else does.