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

Why not put _resetCompilation in this.call #167

Open
19Qingfeng opened this issue Dec 7, 2021 · 1 comment
Open

Why not put _resetCompilation in this.call #167

19Qingfeng opened this issue Dec 7, 2021 · 1 comment

Comments

@19Qingfeng
Copy link

19Qingfeng commented Dec 7, 2021

image

I think it’s better to _resetCompilation in this.call.

Generally speaking, there will be many taps but only one call.

If possible, I am willing to submit for it a pr.

@pvvrzv
Copy link

pvvrzv commented Mar 30, 2022

It only makes sense to reset compilation after a tap or an interceptor were added. Otherwise you will recompile your call function on every hook.call() which is meaningless if the taps and the interceptors of a hook are still the same. And in most cases there are fewer taps compared to calls.

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