Closed Bug 939651 Opened 11 years ago Closed 7 years ago

[B2G][Helix][Contacts][WangChao]After finish importing 1000 contacts from SD, scroll the UI is not smoothly.

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lecky.wanglei, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Tablet PC 2.0) Steps to reproduce: 【Detail Description*】:Scroll after importing 1000 contacts from sd is not smoothly. 【Repro Steps*】: 1.install a sd card with 1000 contacts 2.open Contacts Setting and select import contacts from sd card. 3.when finished, scroll the ui 【Expect Result*】:3. scroll the ui smoothly 【Real Result*】:3. UI is hard to scroll. 【Rate*】:5/5 (100%) 【Gaia commit ID*】: V1.1HD 【Gecko commit ID*】:V1.1HD 【Log*】:
Hi Evelyn: This issue is happened 100%. It seems a performance issue. As i see the code, importing 1000 contacts will cause 1000 times refrsh for UI, it operates as bellow: 1. add 1 contact then add to the list 2. Loop for 1000 times. But not a bulk operate for 1000 contacts. It is better do this as a bulk import. Can you share some time for this? Thanks!
Flags: needinfo?(ehung)
Priority: -- → P2
William, I think our QA had tested bulk importing before, can you verify if it happens on our build? Thank you so much.
Flags: needinfo?(ehung) → needinfo?(whsu)
Hi Evelyn: I've testes on mozilla build(20131108), it happened. We quickly scroll the UI, it sometimes not move, after 3 minutes, it recovered. Thanks!
(In reply to lecky from comment #0) > > 【Gaia commit ID*】: V1.1HD > 【Gecko commit ID*】:V1.1HD Just for the record, these are NOT commit IDs.
Hi, Lecky, Please provide the test data you used. Thanks. --------- Keep Needinfo ---------
Test data with 1000 contacts
Hi, Lecky, Thanks for the help. -------------------------------------------- Hi, all, As I remembered, QAs have ever tried to import contacts from facebook account. (1000+ contacts) We don't get any problem in previous test (V1.0.1) After I used the attached Vcard to test this case, I can reproduce this bug on V1.1.0 hd and V1.1.0. "But", if I re-launch the contact app, the problem is gone. By the way, I cannot reproduce this bug on V1.2. Marked it as leo?. * Test Build: + V1.2 - Gaia: 1b7da292d3fef24027980e6383df4a53ae969d7c - Gecko: d5ccbecb3abd3c760dcef7b5f7195cbeea667cc1 - BuildID 20131114111651 - Version 26.0a2 => Cannot reproduce + V1.1.0 hd (Commercial build) - Gaia: 2d2b2d523ee617c1dd081d171c9dbc6013eb2e84 - Gecko: NA - BuildID 20131107033255 - Version 18.0 => Can reproduce + V1.1.0 - Gaia: d7309be553932635b7e6832d7471256824b5208f - Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/6f04a111aeb1 - BuildID 20130926041203 - Version 18.0 => Can reproduce
Status: UNCONFIRMED → NEW
blocking-b2g: --- → leo?
Ever confirmed: true
Flags: needinfo?(whsu)
Thanks for William. Yes, re-launch the contact app, or wait for 3 minutes, the problem will gone.
Hi Evelyn: I think this is performation iuuse for UI operation. For 1000 contacts import, it will refresh UI for 1000 times, but if the contacts_list larger and larger, it will refresh UI slower and slower, and causes this issue. If it is because some other reasons, please let me know. Thanks!
Flags: needinfo?(ehung)
Hi, how did you measured the fps? So far, we are updating by chunks, don't remember if we modified the chunks for in 1.2
(In reply to lecky from comment #9) > Hi Evelyn: > > I think this is performation iuuse for UI operation. > > For 1000 contacts import, it will refresh UI for 1000 times, but if the I don't think we do UI update as you described. Can you point out which code segment you are referring? Now I can't import contacts from SD card because it seems bug 922526 happens again. William has opened another bug 943810, please make sure your boot image is okay.
Flags: needinfo?(ehung)
Hi Evelyn: 1. in vcard_parser.js: //it once saves one contact, this loop for 1000 times. rawContacts.forEach(function(ct) { VCFReader.save(ct, onParsed); }); 2.every time contact DB changed, it will send a event:oncontactchange in contacts.js navigator.mozContacts.oncontactchange = function oncontactchange(event) { if (typeof pendingChanges[event.contactID] !== 'undefined') { pendingChanges[event.contactID].push({ contactID: event.contactID, reason: event.reason }); } else { pendingChanges[event.contactID] = [{ contactID: event.contactID, reason: event.reason }]; } // If there is already a pending request, don't do anything, // just wait to finish it in order if (pendingChanges[event.contactID].length > 1) { return; } performOnContactChange(event); }; 3.everytime create a contact, the contactlist will refresh by finding the contact via 'event.contactID' in contacts.js function: var performOnContactChange = function performOnContactChange(event) { .... case 'create': contactsList.refresh(event.contactID, checkPendingChanges, event.reason); break; .... } Through the code, so i say it refresh the UI for 1000 times. I think my image is right, our code for sd_import is just same as mozilla. And william has confirm this on Comment 7: + V1.1.0 hd (Commercial build) - Gaia: 2d2b2d523ee617c1dd081d171c9dbc6013eb2e84 - Gecko: NA - BuildID 20131107033255 - Version 18.0 => Can reproduce + V1.1.0 - Gaia: d7309be553932635b7e6832d7471256824b5208f - Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/6f04a111aeb1 - BuildID 20130926041203 - Version 18.0 => Can reproduce Thanks!
Flags: needinfo?(ehung)
> I think my image is right, our code for sd_import is just same as mozilla. > And william has confirm this on Comment 7: Yes, we can reproduce it. William was using Google mode of usb port setting to reproduce, but I need to be in manufacture mode for debugging. That's why I said I can't trace this issue due to bug 943810.
Flags: needinfo?(ehung)
blocking-b2g: leo? → ---
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: