Pass instance into oncreate
as argument, or .call
it
#557
Labels
awaiting submitter
needs a reproduction, or clarification
oncreate
as argument, or .call
it
#557
Follow-up to #525 (comment) —
.bind
is slow and we should avoid it.The code in question is here:
We have a few options:
Go back to passing the context alongside the function
Not totally ideal, since a) you might not have a context, and b) if we were to include additional arguments (#550) then you'd have to deal with those too.
Wrap the function with a
.call
Rewrite the function so that it takes the instance as an argument
I poked around a bit the other night and I don't actually think that's any faster than
.call
, so probably not worth it.I'm also not certain that wrapping the function is quicker than
.bind
, we'd have to check. If not, then maybe we do need to consider going back to the old way of doing things.The text was updated successfully, but these errors were encountered: