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

Review how we deal with a large amount of tabs #5041

Closed
fregante opened this issue Jan 19, 2023 · 5 comments
Closed

Review how we deal with a large amount of tabs #5041

fregante opened this issue Jan 19, 2023 · 5 comments
Assignees
Labels

Comments

@fregante
Copy link
Contributor

fregante commented Jan 19, 2023

With some people hoarding tabs, injection and broadcasting could stall the browser or take several seconds.

Is there anything we can do in this area?

Some thoughts:

  • anonymously collect number of tabs
  • report back when broadcasts affect more than 20 tabs
  • notify user when a run affects a large number of tabs
  • stagger broadcasting
  • exclude discarded tabs

Some operations that involve opening tabs could also have such limits in place, you wouldn't want to run the blueprint open every link on a wikipedia page in a new tab

@fregante
Copy link
Contributor Author

cc @twschiller is there anything actionable here to diagnose the performance issues?

@fregante
Copy link
Contributor Author

fregante commented Oct 7, 2023

I think this compounds with #6548, especially for users who never restart their computer. Imagine a tab hoarder with 100 tabs open and none of them is connectable. Any broadcasted message will be sent up to 700 times in 10 seconds.

@twschiller
Copy link
Contributor

twschiller commented Oct 7, 2023

I agree that this is a good issue to keep in mind. The internal users who tend to have performance issues do have a lot of tabs open

However, excess tabs should only impact:

  • Memory usage
  • Broadcast performance (broadcast isn't common in mods though)

Just having a tab open shouldn't generate background traffic/extra background work utilization if no mods are running on that tab

I think this compounds with #6548, especially for users who never restart their computer.

Brainstorming:

cc @BLoe @grahamlangford

@fregante fregante mentioned this issue Oct 10, 2023
2 tasks
@fregante
Copy link
Contributor Author

fregante commented Nov 10, 2023

Brainstorming: by @twschiller

Some thoughts: by @fregante

Some thoughts:

  • anonymously collect number of tabs
    • I guess not
  • report back when broadcasts affect more than 20 tabs
    • I will add reportEvent('broadcasted to', x, 'tabs')
  • notify user when a run affects a large number of tabs
    • I don’t think each broadcasted brick should actually add a notification on screen so I'll look into logging maybe?
      • Add "Broadcasted to 30 tabs" warning to Mod "logs", if possible.
  • stagger broadcasting
    • This might make sense, but I assume it's not necessary.

I'll try to finalize this issue next week. Let me know if you have reservations.

@fregante
Copy link
Contributor Author

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

No branches or pull requests

2 participants