[SFOS Browser] Solving the browser memory issue

It certainly does crash very frequently now, much more so than in the previous 4.4 releases, or so it seems.

This is probably placebo, but can someone with constant crashes try to remove ‘f’ at the end of apz.touch_start_tolerance in about:config? Don’t see it in android firefox, probably is optional and again placebo but after removing it it seems to lower the crash rate (browsed 3-4 heavy pages like bbc/zeit etc and only managed to get a crash from oom - with all other app covers greyed out, unlike the random browser crashes that leave other apps alive that showed up in 4.5, links and copy-pasting seems unaffected), a reliable crashing website would be really useful to eliminate the placebo effect
BTW where is the browser code on github??? Searching for ‘apz.touch’ in the browser repo returns two commits from 2015 to a file that no longer exists in the current state (neither in 4.5 branch or next, master is unchanged in over a year)
Edit: I guess this was the fix [qtmozembed] Use physicalDotsPerInch for EmbedLiteView dpi. Fixes JB#… · sailfishos/qtmozembed@399ac59 · GitHub
Edit: nope, nvm, just had a non-oom crash, I guess if you want the browser to be stable for an hour try to crash it (at least in your mind)

3 Likes

I removed the f and am very curious now what will happen.

edit: Yippie yeah! Browser is clear better now, not so lazy on taps as before, loads pages faster and typing on keyboard is much more comfortable now.

edit: for what at all came a f in this input field originally? In all apz.touch_*… config fields there is not a single letter but only numbers.
Crashes still occur but much less as before.

2 Likes

Sadly doesn’t seem to work (I guess if you want the crash to happen it reads your mind and gives you an hour to tease you), it seemed somewhat plausible as old qt means old bugs (like base64 function that’s broken if you try to do a round trip, maybe float handling is also borked and the new value we recently got as a fix for long-taps is causing issues more often than old? Not entirely absurd, as the engine hasn’t changed that much, what else could be causing it. It’s definitely a recent change, so narrows down the list of culprits)

This page always results in a oom-kill on my xperia 10 II:

1 Like

Please keep in mind this post is about how to detect errors around the browser or procedures and not a complaint post about the browser.

I will also take the websites from the post bellow to the test bench, might be better to post your links there rather than here.

1 Like

Since i updated the Volla/GS290 to SFOS 4.5.0.19 no more browser crashes!!!

Thank you @piggz and @Jolla !

edit: unfortunately i have to report my first browser crash. :cry: but it’s much - edit: very much less often now.

Same effect here on a Sony XA2 Plus; a lot less crashes after removing the ‘f’.

Please @Jolla, can you publish a minor release for this fix (and maybe even some more improvements)

funny, floating point math. the theme of the week for me. I’ll test this, though frankly, I’ve just moved on to using angelfish which never crashes AND supports WASM, etc. I’ll try a structured report form now.

Visual Studio Code March 2023 10 clicks.
https://spiegel.de just navigate all the cookie related pages. they don’t have any news anyway.

  1. https://diezeit.de it was a nice newspaper until about 1999, same a spiegel. didn’t crash about 3 pages
  2. https://amazon.de steamdeck 1000 euros. no way. ah, 419 direct. It’s more fun in Vietnam. 8 product pages.
  3. Steam Deck causes the fan on my laptop to go, go, go… caused the browser into the background. steamdeck site was visible on the cover. focus, and repeat back to cover. It’s the full backgournd animation. Playing a couple of videos on the steam store also, ooooommmmph.

Ok. that went quick. Still, seems more stable.

steamdeck.com on angelfish crashes almost as quickly. soo it’s not the browser, it’s the web meets memory limited system I guess.

2 Likes

Just for info, in case it interests: I tested both Stock Browser and Angelfish with this site:
http://websdr.ewi.utwente.nl:8901/
(this is a shortwave web-SDR operated by the University of Twente / Netherlands)

Result is:
Sailfish Browser: works perfect, no problems.
Angelfish: Homepage works but sound stutters, browser - edit: only a little bit - too slow.

Do we have any profiling tools for Browser? Can it log its memory usage stats into a file? Is there some rpc mechanism to pull stats?

1 Like

For me this fix is amazing, removing the f made my XA2 much speedier and the browser is really more snappy. This should definitely be in the next release.

3 Likes

Setting general.smooth.scroll to off did also make things better. I guess, the smoothing effects unnecessarily eat memory + CPU capacity for little benefit. So I disabled it and get better results now.

edit: This is a list of about:config settings:
https://kb.mozillazine.org/About:config_entries

2 Likes

Ah, neat. I noticed that scroll for most (not all) crashes they appeared to be triggered by scroll. I wonder if I’m just imagining it or if we get enough confirmation we should build a proper bug report with reproducible pages / behaviours.

3 Likes

I think it’s worth a bug report. It was often reported (and tortured me for a long time :wink: ). I’m really curious what the real underlying problem is.
To my previous post I want to add, that there are more settings in about:config, that begin with general.smoothScroll.* and contain some details for what it’s valid. I did set to off all of them.

First, thanks to get this problem solved. It occurs me too. But how to remove the -f ? Little instruction, please?

1 Like

Open Stock Browser,
enter ‘about:config’ into the browsers address line (without the two ’ )
confirm that you know what you are doing
Then appears a page with abt. 1000 settings, they are sorted alphabetically.

Scroll down to the mentioned field.

Tap into the content field of ‘apz.touch_start_tolerance’ where the f is, set cursor right from the f
Tap backspace once to remove the f
You can also change the number to ‘0.1’
Tap ‘accept’ in the upper right corner of the screen.
Enjoy!

2 Likes

Wow, thanks a lot. Very good hint, made it easy. Seems to be better now. Very nice.

1 Like

This is a list of all Browser tweaks I’ve made until now to speed up Browser:

I have to confess, this does NOT really solve the Browser crash or memory problem from the root, but crashing happens less often now and it speeds up the browser.