AdvancedProfanityFilter icon indicating copy to clipboard operation
AdvancedProfanityFilter copied to clipboard

Insane Memory Usage On Safari

Open GameParrot opened this issue 3 years ago • 3 comments

:bug: Description

When using the extension, the RAM usage is insanely high, When running the test at https://browserbench.org/JetStream/, it goes over 4 GB with the extension and rarely over 600 MB without the extension.

:twisted_rightwards_arrows: Steps To Reproduce

  1. Open Activity Monitor and switch to the Memory tab
  2. Go to https://browserbench.org/JetStream/
  3. Run the test
  4. See the insane memory usage in Activity Monitor

:heavy_check_mark: Expected behavior

The memory usage should not be insanely high

:camera: Screenshots

If applicable, add screenshots to help explain your problem.

:computer: Details

  • Device: iMac
  • OS: macOS 12.5.1
  • Browser: Safari
  • Browser Version: 15.6.1
  • Affected site(s): https://browserbench.org/JetStream/
  • System RAM (total): 16 GB

GameParrot avatar Sep 02 '22 00:09 GameParrot

After a few tests with this, I don't really think there is anything that I can really do to prevent this. The memory usage appears to come as the its creating hundreds of new documents rapidly, and the browser injects a new instance of APF each time. The easiest fix here would probably be to just disable the extension for the page, because its working as its intended to. Benchmarks definitely push what they are benchmarking to their limits, and in this case that appears to be what is happening.

richardfrost avatar Sep 09 '22 22:09 richardfrost

The extension seems to affect performance when browsing on sites even that are not benchmarks, especially ones with a lot of ads. Maybe disabling the extension on ads/iframes should be an option?

GameParrot avatar Sep 15 '22 10:09 GameParrot

@GameParrot That's not a bad idea. I will add it to the backlog to look into that. My first thought is to implement it like the "Domain mode", which controls the overall strategy, and then allow specific domains to change that behavior.

richardfrost avatar Sep 15 '22 15:09 richardfrost

Okay, this option has been added and should now be available in version 2.38.1. Let me know how it goes for you.

richardfrost avatar Oct 24 '22 03:10 richardfrost

@GameParrot Just wanted to check with you and see if this option helped at all for you?

richardfrost avatar Nov 21 '22 16:11 richardfrost