It takes a long time to add a page to Pocket

Issue #29 new
BubiBalboa created an issue

It takes about 2 seconds (sometimes more) for me from pressing the button in the address bar or the context menu item until the page is closed and added to pocket. This really adds up when I'm ding research and have to add like ten or more page to Pocket at a time.

It would be useful if there was a way to make this process a bit more snappy.

I don't know if it would be possible to close the page instantaneously and queue up the adding to Pocket part in the background?

Comments (17)

  1. Pierre-Adrien Buisson repo owner

    Hey there,

    Indeed, this is not appropriate for when you want to add a batch of tabs to your pocket. Queuing saves is a solution indeed, but I'd be more inclined to work on a batch save feature.

    My take on the subject is to multi-select tabs for a started, right-click one of the selected tabs and click "Add selected tabs to Pocket". I'm convinced this is a perfect use-case for this browser feature (even thought I'm not sure how to make it discoverable). When I first looked into, APIs were not ready yet but I believe they are now. I actually already added this ticket to my 0.11.x backlog!

  2. BubiBalboa reporter

    Great idea! I think you needn't worry about discoverability as only a few users will know the Firefox multi-select feature in the first place. It will be a nice surprise to see multi-select working for IMP, too. Just mentioning it under features should be enough I think.

    I know your backlog is long and your time very limited so this is more a hope more than anything but it would be nice if you could look into making the adding process itself a bit faster as well. It just doesn't feel very nice to click the icon and have nothing happen for two seconds.

    Would closing the tab instantaneously and adding it to Pocket in the background even be possible with how Firefox works?

  3. Pierre-Adrien Buisson repo owner

    It can be done. We'd need to store the URLs in a "temporary" list and have the save process triggered by a background script. There might be some work required to handle exceptions though, and it'd also require some UI updates to show pending saves (and maybe problematic ones if save fails).

  4. BubiBalboa reporter

    I think I would give pending saves a red-ish background, pin them to the top of the list and show the fancy new error indicator on the extension button.

    Good to know it is at least possible.

    Just so we are on the same page: I have no idea how much work this is and what your priorities are. I don't expect you doing this anytime soon.

    Thanks for your work and the answers!

  5. JJ

    I just tried doing so and it works for me in 56: added to the list then instantly closed page, tried both PageAction and context menu and it just works, and seeing the code it is indeed handled in background

    Is this issue just stale? Or kept as a reminder of the batch save feature?

  6. JJ

    Request has to take some time, there’s no way around it. But it’s handled just fine in background and you can freely close tab as soon as you click the PageAction button, click it on another page, close this tab too and so on. I guess you mean it takes a while when it is set to close tab automatically, I can look into this too, it shouldn’t break unless there’s connection or API problem (and handling these would require a serious overhaul, but surely it’s doable)

  7. BubiBalboa reporter

    Yeah, I mean the auto-close feature. Ideally it wouldn’t wait for the background stuff and just close the page instantaneously.

  8. JJ

    I added pull request to close tabs instantly, multi-select feature should probably be observed in separate issue

  9. JJ

    @Pierre-Adrien Buisson Hello, can you take a look at my pull requests when you get some time? I know they are stale now and will need some updates but I’ll do that, I’d just like to know if there’s something inherently wrong with them or you simply never had time to check them out?

  10. Pierre-Adrien Buisson repo owner

    As you noticed, I’ve not been very active lately, was barely able to push a few commits here & there. I’m currently testing the upcoming version of the addon that will come with multi-tab “add to pocket list” context menu action, eventually!

    As for the “close tab immediately” thing, I don’t agree with it in the current state. Showing the user a “success” badge without taking into account if the action actually succeeded bothers me, won’t be intuitive for users who won’t understand why the stuff they added to Pocket isn’t there (in case the API request to Pocket fails), even though we showed a green success badge to them.

    If we want to implement this kind of things, a more comprehensive way to deal with items and their status, as I mentioned earlier in this thread.

  11. BubiBalboa reporter

    A few commits here and there is fairly active when it comes to a lot of foss projects so I didn’t notice anything unusual.

    I agree, showing a success badge should only happen when the page really was added successfully.

    I think a good way to handle these errors would be to:

    • add the URLs to a local list
    • pin these items at the top of the normal list (light red background or border maybe)
    • add a retry and the usual trash can symbol to these items so the user can choose what to do
    • show the error badge to highlight unresolved errors

    Thoughts?

  12. Log in to comment