This repository has been archived by the owner on Nov 23, 2017. It is now read-only.
forked from mozilla/gecko-dev
Improve performance by using shouldComponentUpdate #122
Milestone
Comments
So what is the component(s) that should have the shouldComponentUpdate implementation? And should it be comparing keys on the old and new messages? |
We should be able to do the The key would be added where we create the array of messages. |
@pelmers is working on this one |
Some test-writing progress in #128 |
pelmers
added a commit
to pelmers/gecko-dev
that referenced
this issue
Jul 15, 2016
@pelmers thanks for posting the WIP, and I'm so excited to see the test in there! it will be great if we can get numbers on the kind of improvement this provides. |
linclark
changed the title
Improve performance using keys and shouldComponentUpdate
Improve performance by using shouldComponentUpdate
Jul 18, 2016
Closed by #128 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, we are calling render on each message instance with each state change. This is a pretty big performance hit as the array of messages gets larger. If we used keys and shouldComponentUpdate, then only the messages that had changed would go through render.
For the key, we may want to add an autoincremeting ID in utils/messages.js
The text was updated successfully, but these errors were encountered: