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

Allow discarding messages #38

Closed
fregante opened this issue Oct 13, 2021 · 1 comment
Closed

Allow discarding messages #38

fregante opened this issue Oct 13, 2021 · 1 comment

Comments

@fregante
Copy link
Collaborator

In some rare cases, only the latest version of a message is useful, so it's not important to preserve messages that are currently being retried.

Concerns

  • This might be a micro-optimization, depending on the amount of expected messages that will be sent while a target isn't ready
  • The retry logic is handled by p-retry and it might not be easy to check whether a message is currently in queue. Maybe an AbortSignal could be used to automatically cancel any messages in queue

Prior art

Discarding logic:

https://github.com/pixiebrix/pixiebrix-extension/blob/main/src/actionPanel/native.tsx#L167:L167

Used as a notification only:

https://github.com/pixiebrix/pixiebrix-extension/blob/ea335a13e28a8c63ab1c73a6e4c2c2ba27a65da9/src/background/browserAction.ts#L150-L158

@twschiller
Copy link
Collaborator

I would put this as low priority — I haven't seen the overhead for the only current usage have any impact on performance

@fregante fregante changed the title Allow discarding notifications Allow discarding messages Jan 19, 2024
@fregante fregante closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants