Re: [webcomponents] defineElement should not cache lifecycle callbacks and prototype of a custom element class (#417)

I apologize, I could be just not understanding this. The way I understand, the reason for perf optimization is to avoid making a `[[Get]]` just before every callback invocation. This would involve JS engine detecting when an object had change, and only doing a ``[[Get]]`` when both of the following is true:

1. it's time invoke the callback
2. the JS object that represents the element has changed.

When that happens, we'd do a `[[Get]]` and then store/cache it. Otherwise, we would just use the callback value, cached from the previous invocation.


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/417#issuecomment-193388644

Received on Monday, 7 March 2016 18:44:42 UTC