Closed Bug 827815 Opened 11 years ago Closed 11 years ago

[SMS][Optimization] Infinite scroll in SMS keeping the cursor.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:-, b2g18+ fixed, b2g18-v1.0.1 fixed)

RESOLVED FIXED
blocking-b2g -
Tracking Status
b2g18 + fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: borjasalguero, Assigned: borjasalguero)

References

Details

(Keywords: perf)

Attachments

(1 file)

If the list of messages is large given a phone number, we should paginate at Gaia level in order to get best performance and don't get blocking renderings.
Blocks: 806592
It's related with https://bugzilla.mozilla.org/show_bug.cgi?id=825604, so probably it should have the same status.
tracking-b2g18: --- → ?
Assignee: nobody → fbsc
This is the work that I originally thought was going to be done in bug 813978, which is a blocker.

Without this, even a relatively small number of SMS's in the DB renders the SMS app unusable.  I had to decommission my dogfooding phone because of this.  I would absolutely block the release on fixing this.
blocking-b2g: --- → tef?
Blocking per comment #2, as well as comments from other partners about performance of SMS views with reasonable numbers of messages (I'm trying to get the numbers they tested with).

Adding qawanted - Can we find out the display times for 100 messages, 500 messages, 1000 messages, etc.

Borja, do you know what needs to be done to fix this? Do you have an estimate for when it can be fixed?
blocking-b2g: tef? → tef+
Keywords: perf, qawanted
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
The datapoint that's keeping my dogfood phone switched off is

 165 messages: ~10s to load conversation view

gwagner/fabrice/philikon have a script to preload an SMS DB.
(In reply to Chris Jones [:cjones] [:warhammer] from comment #4)
> 
> gwagner/fabrice/philikon have a script to preload an SMS DB.

The script can be found in bug 806598.
> Borja, do you know what needs to be done to fix this? Do you have an
> estimate for when it can be fixed?

I had a patch almost ready, but after talking with Etienne I think that the performance could be even more improved. Tomorrow I will take this task again and I will come back with more details.
We have two issues here. One is getting a better performance, making a surgical patch for improve this weird behaviour (and this is tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=833855 ), and other one is using the cursor for getting a lazy-loading of messages given a thread. I would like to consider this one tracking-b2g18, and update the status of 833855 to tef+  (there is a patch ready made by Etienne).
blocking-b2g: tef+ → tef?
blocking-b2g: tef? → -
I don't care to play the flag-jockeying game, but we can't ship a phone with unusable SMS functionality.
I guess that's going to be bug 833855 now?  Alright.
Borja, is performance good enough at this point? All other bugs related to rendering messages before we've loaded them all have been marked fixed.

If performance is still not good enough we need to renominate this bug.

Please keep in mind that we don't need to add complex pagination UI here. We simply need to render 10 or so messages and then slowly insert the remaining ones.
Hi Jonas,
I was talking with UX about how to improve SMS performance, and different strategies for accomplishing this goal, and they told me that the 'infinite-scrolling' could be the best one, because you load at the beginning a 'chunk' of messages (for example 10), and when you scroll SMS App will render other set of messages and so forth. With the patch of Etienne and with other improvements SMS App is getting a better user experience, so with this latest fix the interaction the loop would be done. I have to polish some details with UX, so I will come back with the details.
Attached file PR
Attachment #712411 - Flags: review?(felash)
Im working on making the test work again. However we could start reviewing the code and testing the performance meanwhile.
Summary: [SMS][Optimization] Pagination in SMS keeping the cursor. → [SMS][Optimization] Infinite scroll in SMS keeping the cursor.
Comment on attachment 712411 [details]
PR

r=me

This makes Sms work with a big volume of data.

If we want to be better than that we'll need to avoid adding the DOM we don't need.
Attachment #712411 - Flags: review?(felash) → review+
QA should test SMS extensively when this lands because there are a lot of changes in how Sms are rendered.
Thanks Julien for the review & support. SMS App performance it's gonna let the user get a better user experience for sure! Merging!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment on attachment 712411 [details]
PR

[Approval Request Comment]
Bug caused by (feature/regressing bug #): -

User impact if declined: Sms app is unusable when the threads have too many SMS

Testing completed: yes

Risk to taking this patch (and alternatives if risky): medium as lots of things changed. I've tested the most current use cases and this seems to work correctly but we may find other bugs with dogfooders.

String or UUID changes made by this patch: none
Attachment #712411 - Flags: approval-mozilla-b2g18?
This is a really a great performance improvement that we should seriously consider to land in v1-train. 

Our QA team is testing this to check there are no regressions in master based on risk assessment on comment 18.
Comment on attachment 712411 [details]
PR

NOTE: If blocking-basecamp+ is set, just land it for now.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed: 
Risk to taking this patch (and alternatives if risky):
Attachment #712411 - Flags: approval-mozilla-b2g18? → approval-gaia-v1?
The bug has been checked by Telefónica QA team. We executed a small regression on the master branch.

Everything works fine in the master branch, but we will need to retest it when landed in v1-train to ensure the quality.
Based on how bad the performance is with more than 30 SMSs in the same thread (more than 2 seconds to start interacting with screen), I am nominating this as a blocker for telefónica.
blocking-b2g: - → tef?
Attachment #712411 - Flags: approval-gaia-v1?
We're approving for landing, but not blocking on this bug. The reasoning is that if this medium-risk patch causes regressions, we'll want to back it out immediately (and may not take another forward fix).
blocking-b2g: tef? → -
We already know there is a regression but it is already fixed by Bug 841684.
Please don't checkin until Bug 841684 is approved. And then please land both in the same time.
Attachment #712411 - Flags: approval-gaia-v1+
Comment on attachment 712411 [details]
PR

Approving for v1-train and v1.0.1, alongside bug 841684.
v1-train: bbf2b241e478c3f7caa98c61e459772d579d9a68
v1.0.1: f1fb0d896ea0ec7e523cf1c075f23d62d66a8873
qawanted doesn't appear necessarily anymore - removing keyword, as this was needed for  analysis before development.
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: