We're updating the issue view to help you get more done. 

Track bound dynamic variables to support binding in async mechanisms.

Description

The issue has been raised before:

While the reasoning behind the proposal is still valid, the original approach has made no progress due to the performance penalty. I have implemented a simplified approach with mutable JavaScript datastructures to minimize the performance impact. Because we are single-threaded we can use js assignment and don't need to port Clojure's binding frame. A small penalty is paid by the user of binding (see benchmark8) and a higher one by async mechanisms capturing and restoring the bindings (benchmark1-7):

https://gist.github.com/whilo/a8ef2cd3f0e033d3973880a2001be32a

I would provide patches to ClojureScript, if this looks like a worthwhile approach.

Environment

Any cljs version.

Status

Assignee

Unassigned

Reporter

import

Labels

Approval

None

Patch

None

Affects versions

1.7.228

Priority

Minor