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

Overhead of push/pop thread bindings is high #284

Open
ipostelnik opened this issue May 18, 2015 · 2 comments
Open

Overhead of push/pop thread bindings is high #284

ipostelnik opened this issue May 18, 2015 · 2 comments

Comments

@ipostelnik
Copy link
Contributor

My profiling showed that managing thread bindings for *op-call* and *flow-process* vars carries a lot of overhead. In my test these calls accounted for about 16% of flow execution, excluding IO (scheme input/task output). This was after I had applied the change from #283 to optimize null checks.

@sritchie
Copy link
Collaborator

@ipostelnik, yeah, this is a good catch. I wonder if we should set a flag in the config that would conditionally enable/disable this feature. Checking the config on each call would be far cheaper.

@ipostelnik
Copy link
Contributor Author

#285 also relies on this functionality.

I guess we could add some sort of metadata annotation to operations that want to use these vars. Alternatively, maybe we could change them from proper clojure vars to something like a ThreadLocal?

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