rNeomy / auto-tab-discard

Use native tab discarding method to automatically reduce memory usage of inactive tabs
https://webextension.org/listing/tab-discard.html
Mozilla Public License 2.0
906 stars 79 forks source link

Symbol for a discarded tab duplicated; prepended more than once #262

Open grahamperrin opened 2 years ago

grahamperrin commented 2 years ago

This might be unreasonably difficult to reproduce (I have a mass of other extensions enabled) but for the record:

2021-12-19 12:53:30

Loading the discarded tab then briefly trying, failing to reproduce the issue:

https://user-images.githubusercontent.com/192271/146675759-125035cb-c804-4144-a7fc-c582cc0f2d95.mp4

% date ; uptime
Sun 19 Dec 2021 13:02:37 GMT
 1:02p.m.  up 1 day, 17:47, 7 users, load averages: 0.78, 1.47, 1.46
% pkg info -x firefox
firefox-95.0_1,2
% freebsd-version -kru
14.0-CURRENT
14.0-CURRENT
14.0-CURRENT
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #116 main-n251146-d109559ddbf: Mon Nov 29 14:34:59 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400043 1400043
% pkg -vv | grep -e url -e enabled
    url             : "pkg+http://pkg0.bme.freebsd.org/FreeBSD:14:amd64/latest",
    enabled         : yes,
    url             : "https://alpha.pkgbase.live/current/FreeBSD:14:amd64/latest",
    enabled         : no,
    url             : "file:///usr/local/poudriere/data/packages/main-default",
    enabled         : yes,
% 

image

@rNeomy please go ahead and close, if this issue is not of interest. As far as I can tell, the bug is purely cosmetic.

NerdyDeedsLLC commented 2 years ago

image Reproduced.

grahamperrin commented 2 years ago

Genius.

Is it too soon to ask whether you have methodical steps to reproduce?

If not something methodical, a gut feeling?


I have a separate problem in recent days, maybe entirely unrelated to Auto Tab Discard, maddeningly difficult to pinpoint what's involved … I'll not yet describe the symptoms (don't want to throw people off the scent of this issue).

NerdyDeedsLLC commented 2 years ago

@grahamperrin

In truth? That was a first install for me. I observed the behavior, and swung past to file a heads up. Gimme a few hours though; I'm confident I can reproduce. I'll fiddle with it. I can tel you this: 95% certain it comes from having tabs already inert, screwing with the settings, and then manually instantiating the "discard all other tabs"/"tabs to the right"/etc.

Best guess: the author doesn't appear to have much in the way of conditionals to perform CURRENT STATE tests. MANY of the tabs (note the two next to the double in the image above) got NO 💤 at all (those two included). Moreover, he describes a case in one of the FAQ's in which a tab will fail to sleep if the 10 second timeout had already fired before a second tab had been opened.

In short, the author doesn't appear to be sweeping all tabs in all windows each time one of the extension events takes place (e.g. in the hypothetical 10s/1 tab scenario, if I had opened a third tab, when the second hits its respective 10s, tab 1 doesn't appear to be reevaluated), nor does it appear to fire on qualifying browser events (e.g. when that third tab was opened in the first place).

I strongly suspect the issue is related to some combination of triggers like that.

grahamperrin commented 2 years ago

Thanks,

In truth?

Truly; there's the screen recording of me failing to reproduce the issue.

hurzl commented 2 years ago

I too get many zzZ symbols (at the moment 5 to 11) on some tabs, and it's not cosmetic, because the title is unreadable then. firefox 101

... and the symbols are disabled in settings ...