Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FoxyTab] Feature Request: Remove All/Selected Tabs from Bookmarks #595

Open
bilgincoskun opened this issue Sep 23, 2023 · 6 comments
Open
Labels

Comments

@bilgincoskun
Copy link

Hi,
It would be nice to have an option to remove all or selected open tabs from bookmarks as a complement to closing bookmarked tabs.

@erosman
Copy link
Owner

erosman commented Sep 23, 2023

That is possible, however, searching & deleting bookmarks is a bit slow, especially if there are many bookmarks.
Let's see how popular the feature would be.

@bilgincoskun
Copy link
Author

Would performance penalty be much different from closing bookmarked tabs since it seems it also uses searching?

@erosman
Copy link
Owner

erosman commented Sep 23, 2023

Slightly more ....
Both functions use bookmarks.search() but "Close Bookmark Tabs" closes tabs, while "Remove Tabs from Bookmark" would have to delete (and update) the bookmark database.

Furthermore, the bookmarks.remove() API only supports single delete which means deleting 10 bookmarks will result in 10 separate asynchronous operations.

@Sorontik
Copy link

Hello,
I'd also be very interested in this feature.

Especially, since the reverse operation ("add bookmarks for all selected tabs" by drag'n'drop) is already standard part of ff and it happens very easily by accident if you drag your tabs around alot.

In addition to

  • remove ALL bookmarks for the selected tabs

i would also suggest the following options, if possible:

  • remove the latest bookmark for the selected tabs
    _ (a lifesaver if you accidentally dropped a selection of tabs into a non-empty bookmark-folder and need to remove the new bookmarks without deleting previously existing bookmarks)_

  • remove the oldest bookmark for the selected tabs
    (if you have created new bookmarks for certain tabs instead of moving the old ones)

since bookmarks.search() returns the TreeNodes in order of creation (according to the documentation), it should be fairly straightforward to only remove the first or last element of the list (if the list is not empty).

And if that order proves to be unreliable, the sorting could still be done based on the "added" or "modified" timestamps of the bookmarks.


Regarding the performance concerns:
for a few dozen tabs i would not expect the performance penalty to be noticeable for the user
(especially compared to operations like closing tabs, where a lot more has to happen in the background)

and anyone performing these operations on a hundred tabs or more should expect that the operation might take a few seconds.
(not to mention that firefox itself starts behaving strangely if you have several hundred open tabs at the same time)

Also i think that one would very rarely have more than 2 or 3 bookmarks for the same tab/page
(and if someone does, they should probably have used multiple keywords on one bookmark instead of multiple copies in different folders)

@erosman
Copy link
Owner

erosman commented Jun 17, 2024

and anyone performing these operations on a hundred tabs or more should expect that the operation might take a few seconds.
(not to mention that firefox itself starts behaving strangely if you have several hundred open tabs at the same time)

True, however there are some users who have 5000+ open tabs (e.g. #626)

See also: Proposal: Remove multiple bookmarks in bookmarks.remove()

@bilgincoskun
Copy link
Author

bilgincoskun commented Jun 17, 2024

I forgot I opened the issue until I got a mail.

Some time ago, I decided to give it a try and wrote this extension:

https://addons.mozilla.org/en-US/firefox/addon/remove-tabs-from-bookmarks/

The main caveats with the current API are:

  • It is true that with many bookmarks, it takes long time to remove all links, although with async calls, the browser continues to work fine. I didn't try with 5000+ tabs but from what I see with about 500 bookmarks the main the bottleneck is bookmark numbers, whether the bookmarks are in the same folder, if they have only one copy etc. and not tab number.

  • Same cannot be said for bookmark operations. Adding new bookmarks lags for several seconds.

  • Although not due to the extension but the API itself, another caveat is about tags. When removed and added back, same tags are still present until removed from the dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants