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

EVENT: Optimizing the handler function registration #8

Open
pauleveritt opened this issue Oct 16, 2022 · 0 comments
Open

EVENT: Optimizing the handler function registration #8

pauleveritt opened this issue Oct 16, 2022 · 0 comments

Comments

@pauleveritt
Copy link
Contributor

There's a lot of potential YAGNI below. If needed at all, unlikely to be needed any time soon.

When I was doing empty_button with mousemove event I thought: I bet my CPU is getting toasty. Lots of likely-expensive calls across the proxy. It made me think: we could put a wrapper on the JS side that did a little mediating before calling the registered proxy.

Debouncing

The decorator could have an optional value to set some debouncing policy.

Logging

When trying to figure out what's going on with events, this wrapper would provide a central place to collect info. Perhaps with a py-config knob.

Expression

I'm kinda proud of this one. Write a truth-y arrow function that gets run to determine whether to call the proxy.

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

1 participant