Skip to content

Conversation

@chancancode
Copy link
Member

A quick survey in our app indicates ~77% of PropertyReference have a const parent. This is unsurprising, because most path lookup curlies are single-level (no dots in the path) lookup on the component directly.

This means we can do less work and book-keeping in those cases (checking if the parent is a proxy on every compute, etc).

@chancancode
Copy link
Member Author

chancancode commented Aug 7, 2016

In my not completely scientific experiments, this accounts for over 10% improvement in initial render time.

@krisselden
Copy link
Contributor

@mmun I thought we had tests that allowed {{str.length}}

@chancancode
Copy link
Member Author

@krisselden that crossed my mind too, but I am just mirroring the current behavior

@chancancode
Copy link
Member Author

@krisselden while you are here, can you review 4ce0954 ?

@chancancode
Copy link
Member Author

There seems to be additional wins associated with the latest commits, but my setup is too noisy to test that at the moment

@krisselden
Copy link
Contributor

A quick survey in our app indicates ~77% of `PropertyReference` have a
const parent. This is unsurprising, because most path lookup curlies are
single-level (no dots in the path) lookup on the component directly.

This means we can do less work and book-keeping in those cases (checking
if the parent is a proxy on every `compute`, etc).
This avoids an extra shape transition when the component is updated.
We don’t need this anymore, see a447c48
This commit flips the responsibilities around – instead of making each
reference do the work to track whether they are dealing with proxies, we
can just make proxies themselves provide the right tag and do the book-
keeping internally.

With this change, `tagFor(proxy)` will return a tag that accounts for
changes on the proxy itself as well as its content. This frees the rest
of the system from worrying about that difference and removes a lot of
runtime `isProxy` checks.
@chancancode chancancode force-pushed the optimize-property-reference branch 2 times, most recently from 10dd359 to 5d17ffe Compare August 10, 2016 23:00
@chancancode chancancode force-pushed the optimize-property-reference branch from 5d17ffe to 47511c3 Compare August 11, 2016 01:29
@chancancode chancancode merged commit 729adca into master Aug 11, 2016
@chancancode chancancode deleted the optimize-property-reference branch August 11, 2016 05:04
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

Successfully merging this pull request may close these issues.

3 participants