Closed Bug 1010236 Opened 6 years ago Closed 5 years ago
[Messages] When setting recipients
.length, we should rerender only if the length decreases
In , we render each time the length is set. However it seems we set "recipients.length = 0" several times during some panel transitions, and as a result we call "render" each of this times. "render" does not look to be that expensive when length is 0, but it stills do some operations that look costly even in that case (accessing textContent, calling scrollIntoView). Therefore it looks to be an helpful and easy change to prevent calling it too many times.  https://github.com/mozilla-b2g/gaia/blob/5fd5c952cdc6f89613ccf6fa0f7f39fee9898bb9/apps/sms/js/recipients.js#L147
Whiteboard: [sms-papercuts] → [sms-papercuts][lang=js][good first bug]
Comment on attachment 8515508 [details] [review] pull request github r=me with a nit
Attachment #8515508 - Flags: review?(felash) → review+
Fixed the nits and landed: master: 1aec4232e08f4e123692aa8c025d57b924da138c thanks a lot Maxime!
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.