dhowe / AdNauseam

AdNauseam: Fight back against advertising surveillance
GNU General Public License v3.0
4.45k stars 187 forks source link

AdVault with too many ads not rendering - "tab unresponsive" #2504

Open mneunomne opened 5 months ago

mneunomne commented 5 months ago

Too many ads on my vault are failing to render, it makes the tab timeout.

It seems to crash at around 3000 ads being displayed at the same time.

Image of the vault (not all ads being displayed):

Screenshot 2024-01-15 at 00 07 43
dhowe commented 5 months ago

A couple of options here, long and short term, respectively:

  1. rewrite the D3 code to be cleaner/more efficient (it is quite a mess right now)
  2. restrict the number of ads users can view at one time
ashkitten commented 5 months ago

I ran a profiler on the process while it was working on rendering the ad vault. We spend most of our time doing rectangle packing, specifically checking if one rectangle contains another in order to merge them.