Bug 836170 - [Contact]: Scrolling and Dragging in contact application is very slow #8045
Conversation
@@ -290,8 +290,6 @@ if (typeof Contacts.extFb === 'undefined') { | |||
break; | |||
|
|||
case 'fb_updated': | |||
contacts.List.load(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a synchronization finishes, maybe contacts may have been changed so we call to contacts.List.load() when at least one of them have been changed. Now is it ok? I guess you will receive oncontactchange and this call is not necessary anymore, true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the case, when the synch happens, we will receive oncontactchange and will update if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I understand, so we should remove that as well, right?
I've detected two bugs:
|
Thanks for the feedback Cristian, I understand that the photo is not stored in the contacts photo it self, so a oncontactschange is not fired and we don't have any clue of the change. Same with the friend linking. Here we have two actions, either force a change in the contact, or trying to fire a custom event that acts as the oncontactschange. Thanks for spotting this! |
and maybe the same with the company |
@arcturus when a link operation happens the local contact is updated in the Contacts DB, so the oncontactschange event should be fired. The same happens with the photo, even if the photo is updated on other DB the local contact is updated, thus I think something wrong is being done in some place. |
@jmcanterafonseca you are right, after doing some tests, even writing some code I realise that you change the contact to specify the new url for the image. So that triggers a onContactsChange, and so far is working. I tried for both the photo and the company and works as expected. Same with the linking @crdlc, is you gecko recent? This oncontactchange was added some days ago, could you update your gecko please? |
ok, testing, I updated my gecko one week ago (02-07-13/) |
Hi folks, both @crdlc and @albertopq could you try? I had to modify the addToList method to take into account that it should receive contacts that are facebook or linked to facebook, and pass that extra information to the method for rendering the extra info. Cheers! |
During morning I am going to test it |
@arcturus the patch is not working properly. It introduces weird behaviors when linking and unlinking FB Friends. If you link a Contact to a FB Friend temporarily you see the Contact List and afterwards a the Contact detail. Even worst is the case when you unlink a FB Contact on which you temporarily see the unlinked device Contact and then you see the FB Friend Contact. Please check these behaviors in the current master or train branch just to see how it should be working. |
@jmcantera we solve the first and the worst problems. Hope now are looking ok for you :) |
} | ||
showGroup('favorites'); | ||
}; | ||
|
||
function addToFavoriteList(c) { | ||
function addToFavoriteList(favorite) { | ||
var group = 'contacts-list-favorites'; | ||
var container = document.getElementById(group); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use headers['favorites'] here?
Sorry it fails, I have an empty list. I import my friend Javi Chiquitin, then I create a new contact called Javi, I link this one to Javi Chiquitin and finally I have two duplicated contacts Javi Chiquitin |
@crdlc yep, after suggestions from @albertopq we had the same problem. Working on it. |
Hi guys, lats changes done, and the rebase made with latest PR from @albertopq done as well. Hope this time everything is really fixed. |
if (pendingChanges[id].length >= 1) { | ||
performOnContactChange(pendingChanges[id][0]); | ||
} else { | ||
console.log('No more changes for ' + id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need that in the final version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope definitely not thanks for spoting :) (too much debug yesterday)
@arcturus apart from the two nits found I have not found any other regression concerning FB. Please note I have not tested possible regressions with Web Activities. |
@jmcanterafonseca yes we tried WebActivities, but we wanted other people to take a look, anyway QA folks will say something :) |
Bug 836170 - [Contact]: Scrolling and Dragging in contact application is very slow
Fixed all unit tests and problems detected on the unit tests as well.
Rebased and conflicts solved with current master