Closed Bug 854417 Opened 12 years ago Closed 11 years ago

[MMS][SMS] Refactor the ThreadListUI rendering method: do not empty the entire list on every render

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 927783

People

(Reporter: rwaldron, Unassigned)

Details

(Keywords: perf, Whiteboard: [c= p= s= u=])

Currently the ThreadListUI.renderThreads method will clear the entire list before adding any new threads or updating existing threads, this may be inefficient. 1. new threads can be inserted at the top of the list 2. existing threads that are receiving updates can be removed and (re) inserted at the top of the list.
As Julien mentioned in the PR, I was holding off on this until the cursor for getThreads was completely available. I don't know what the Mozilla etiquette for taking tickets that are assigned to others is, but in most projects it's considered a best practice to ask the owner before assuming control.
Hi Rick, sorry if you're taking this the wrong way, but it was just the outcome of working on other issues in the messaging application, where I hit the redraw problem as well, f.e. the edit mode and receiving a new message, where Borja showed me a problem last Friday. Plus while working on the multi-message channels that I proposed in the mailing list where incremental updates are nicer as well. While I was working on that I branched out and put all the thread list rendering in a separate branch. Ergo: it was not my intention to 'steal' the issue or something, but it was the result of working on some other stuff. If you like this way: feel free to work further on it, if the cursors would solve all these problems anyway then that's totally fine with me as well.
(In reply to Rick Waldron from comment #2) > As Julien mentioned in the PR, I was holding off on this until the cursor > for getThreads was completely available. > > I don't know what the Mozilla etiquette for taking tickets that are assigned > to others is, but in most projects it's considered a best practice to ask > the owner before assuming control. Mozilla etiquette is also to unassign yourself when you're not working on it _now_ ;)
Assignee: waldron.rick → gnarf37
This also needs to only allow one renderer to be happening at once.
@Corey, this has been implemented in bug 857964
Is this still relevant?
Flags: needinfo?(waldron.rick)
Every time there is an update that loads the list, it re-renders the whole thing, it seems very relevant. This is a tech debt issue more than anything.
Flags: needinfo?(waldron.rick)
This is still relevant. note that Bug 859730 is similar but also different. Here, we'd want to update only part of the list when we need to update it whereas in bug 859730 we want to put in the DOM only what's displayed (and maybe some ahead and above).
Summary: [MMS][SMS] Refactor the rendering method: do not empty the entire list on every render → [MMS][SMS] Refactor the ThreadListUI rendering method: do not empty the entire list on every render
Keywords: perf
Assignee: gnarf37 → nobody
Julien, is this still an issue?
Flags: needinfo?(felash)
Priority: -- → P3
Whiteboard: [c= p= s= u=]
I'll need to check, recent patches have changed this and this may be ok now.
Yep, this is obsolete now. This was done as part of the work in Bug 927783 (I asked to split the patch but it wasn't split in the end).
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(felash)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.