Closed Bug 954214 Opened 10 years ago Closed 10 years ago

Freeze while downloading buddy list

Categories

(Chat Core :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clokep, Assigned: florian)

References

()

Details

(Whiteboard: [0.3-wanted-final])

Attachments

(1 file)

*** Original post on bio 780 at 2011-05-13 12:28:00 UTC ***

From the report on the mailing list of a freeze when first connecting accounts, flo believes it's an synchronous write issue of the buddy list:

flo: it sounds a lot like the freeze when writing the buddy list to disk when it is received the first time an account is connected. Almost unnoticable on some machines, and very long on some others, especially when there are lots of buddies in the received list, when the file system is slow (NTFS...) and when the hard disk is slow (low end laptop...)
flo: the real problem is that we write the list to the disk synchronously. So we do a blocking write operation per buddy. 
clokep_work: flo: Are there async methods we could use instead? 
flo: clokep_work: the root of the problem is that we need to have finished the SQL write do know the id of the new buddy, which we need to create a useful buddy object. 
flo: if we decide that the UI doesn't need to be notified synchronously when a prpl notifies purplexpcom of a new buddy, we can wait for the SQL write to finish before notifying the UI. 
clokep_work Maybe (for first connect of an account) we could do something like "Loading your buddy list. . ." and not show anything until it's done. 
flo: On 0.2 it used to also freeze when connecting, even when not the first time, because of server alias updates, but the SQL write doesn't return any information in those cases, I just made those requests asynchronous for 0.3 
flo: clokep_work: how do you know you are loading the buddy list? how do you know it's done? 
flo: some prpl load the buddy list after marking the account as connected, some other before. It's not even consistant accross protocol plugins :-D. 

(See http://log.bezut.info/instantbird/110513/#m125 for the full conversation.)
Whiteboard: [0.3-wanted]
Summary: Freeze while loading buddy list → Freeze while downloading buddy list
Whiteboard: [0.3-wanted] → [0.3-wanted-final]
Attached patch PatchSplinter Review
*** Original post on bio 780 as attmnt 704 at 2011-06-08 14:16:00 UTC was without comment, so any subsequent comment numbers will be shifted ***
Assignee: nobody → florian
Status: NEW → ASSIGNED
*** Original post on bio 780 at 2011-06-08 17:30:14 UTC ***

https://hg.instantbird.org/instantbird/rev/50a0839a5888
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.3b1
You need to log in before you can comment on or make changes to this bug.