AidanSpeakss / streamer-mode-for-firefox

Hides personal information from pages, similar to Discord's Streamer mode.
GNU Affero General Public License v3.0
28 stars 6 forks source link

Page freeze when loading https://coronavirus.data.gov.uk/ #3

Open valknight opened 2 years ago

valknight commented 2 years ago

Hiya! I installed the extension, then tried loading coronavirus.data.gov.uk - it resulted in the page freezing, and Firefox prompting me that the extension was taking a long time. I uninstalled the extension, and reloaded the page just fine.

This might be to do with the graphs on this page loading in lots of data when hovering, but, this seems like a big issue considering the nature of the website.

valknight commented 2 years ago

(Just to clarify: the exact page that caused a freeze was the case rates graph page, hence my guess with the amount of text loaded into the DOM but hidden)

AidanSpeakss commented 2 years ago

Could you post the exact link to the page you are talking about? I am not able to replicate the issue on this page: https://coronavirus.data.gov.uk/details/cases

valknight commented 2 years ago

I'm using that same page. I actually left it to sit for a few minutes, and it did finally load (after my laptop fans span up a little), so it seems to not be a freezing bug but moreso severe performance degredation when loading this page on my machine.

As for the data entered to do this, I've entered the following example data to cause the issue on my machine: 100,101,102,103,104,105,106,107,108,109,110

Screenshot of the popup indicating firefox is recognising a severe performance impact below:

image

As for the specs of my computer, I'm using a 2019 MacBook Pro with an Intel i5-8257U and 8 gigabytes of RAM, so it's not a particularly lowspec machine.

Opening activity monitor during load times sees Firefox hit 100% CPU usage, with this not occurring without the extension present.

image
valknight commented 2 years ago

(for context: this machine is one I usually use for video editing with Premiere Pro, or code editing with Trello, VS Code, Fork, Discord and Notion open, and runs absolutely fine with those tasks. it's why i'm a little surprised one extension can tank my laptop's performance so much)

trinaldi commented 2 years ago

Is it possible to add an option to exclude the current site?

AidanSpeakss commented 2 years ago

I will be adding a whitelist feature, I just need some time to complete it. It would be very useful for this specific purpose, and many other use cases.

AidanSpeakss commented 2 years ago

But for now I will add it to the unsupported sites list, until I resolve the issue.

ConniBug commented 2 years ago

I feel this might have been resolved of the CPU Might have been reduced after my pr, But the site might be breaking as i remember aidan talking about the addon hooking some "preload" or "update" callback, but im just going off memory instead of refferencing actual code.

AidanSpeakss commented 2 years ago

I feel this might have been resolved of the CPU Might have been reduced after my pr, But the site might be breaking as i remember aidan talking about the addon hooking some "preload" or "update" callback, but im just going off memory instead of refferencing actual code.

Essentially the CPU usage from pages with massive amounts of data can be a bit too much for some computers to handle. I'll look into a feature that will detect how much CPU usage a certain page will take, and if it exceeds a certain amount to ask the user if they want to continue.

ConniBug commented 2 years ago

Thats a good way to stop people from locking up their browser which is good, but ofc its not a solution, probably something obvious knowing computers :(