-
Notifications
You must be signed in to change notification settings - Fork 51
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
Faster remove
#118
Faster remove
#118
Conversation
- Use of `await` removes need for `setTimeout`. - `cachedData` only ever got `undefined` entries.
Also swap `swap` and `remove` to match expected execution order.
Hey @Lx I haven't had time to review these PRs. I just made you a collaborator on the project so you can merge them. Cutting a release is currently a manual process. |
Thank you. I'll need to find some more time and read up on releasing, but if I can get around to it before you do, I'm happy to give it a go. |
@Lx Could you please merge this commit? I guess It fixed a problem that I've faced |
Sorry, but as far as I'm aware, I don't have that ability. |
Seemingly, I misinterpreted the comments above, deciding that you gave the necessary rights. Maybe you could do opposite: merge changes to your fork. Really sorry for this suggestion. But I guess it would be a quite easy for you. I think this plugin is pretty nice and would be great if someone will take the role of maintainer. |
This pull request speeds up button deletion by ~2 seconds when the
remove
option is used. Removal ofsetTimeout
calls also removes avenues for potential race conditions.Note: this PR depends on #117, and may be easier to grok after #117 is merged.
I appreciate that you're working on a new version of Buttons but I think this fix might benefit others in the meantime if you would be willing to release it.