Bug 15825 - [GTK] curl - slow dns causing hangs
Summary: [GTK] curl - slow dns causing hangs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 523.x (Safari 3)
Hardware: All Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Curl, Gtk
Depends on:
Blocks:
 
Reported: 2007-11-04 00:18 PDT by Salvatore De Paolis
Modified: 2007-12-09 13:53 PST (History)
0 users

See Also:


Attachments
limit to 5 connections globally (1.83 KB, patch)
2007-12-04 15:02 PST, Luca Bruno
no flags Details | Formatted Diff | Diff
fix curl (2.01 KB, patch)
2007-12-05 01:24 PST, Luca Bruno
no flags Details | Formatted Diff | Diff
fix curl (2.67 KB, patch)
2007-12-05 01:29 PST, Luca Bruno
no flags Details | Formatted Diff | Diff
put jobs in the right queue (7.47 KB, patch)
2007-12-08 13:18 PST, Luca Bruno
alp: review-
Details | Formatted Diff | Diff
do not crash on job cancel (7.54 KB, patch)
2007-12-09 00:59 PST, Luca Bruno
no flags Details | Formatted Diff | Diff
alternative using vectors (5.28 KB, patch)
2007-12-09 07:19 PST, Luca Bruno
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Salvatore De Paolis 2007-11-04 00:18:01 PDT
Loading this url
http://www.osnews.com/story.php?news_id=18873
Comment 1 Luca Bruno 2007-12-04 15:02:59 PST
Created attachment 17706 [details]
limit to 5 connections globally

The problem is that there's no way to limit curl to a specific number of connections.
This patch solves the problem.

However, we need to work more on that, because the limitation is globally and not per domain.

I suggest to land this patch which is useful for other purposes (for example working on wysiwyg, which are really heavy if the issue remains).
Comment 2 Luca Bruno 2007-12-05 01:24:18 PST
Created attachment 17713 [details]
fix curl

I tested the patch by browsing several websites that before had this problem due to bad cURL management.

The new patch is complete of ChangeLog. I also added a FIXME to create a separate stack of jobs per domain.
Comment 3 Luca Bruno 2007-12-05 01:29:08 PST
Created attachment 17714 [details]
fix curl

forgot header file
Comment 4 Luca Bruno 2007-12-08 13:18:21 PST
Created attachment 17789 [details]
put jobs in the right queue

Using a list, all requests were satisfied with the wrong order.
Now a queue class has been added to do this work.
Comment 5 Alp Toker 2007-12-08 17:58:26 PST
Comment on attachment 17789 [details]
put jobs in the right queue

So, this solves a lot of problems. Pages load faster, fewer resources used.

r- though due to the crasher when jobs are cancelled.
Comment 6 Luca Bruno 2007-12-09 00:59:49 PST
Created attachment 17799 [details]
do not crash on job cancel

The previous patch crashed when a job was canceled. This one instead has the same behavior of the original code.
Notice how using the queue most of the code in the manager has been collapsed and therefore cleaned.

Still missing a separate stack of connections per domain, but this is another bug yet.
Comment 7 Luca Bruno 2007-12-09 07:19:59 PST
Created attachment 17804 [details]
alternative using vectors
Comment 8 Alp Toker 2007-12-09 13:46:12 PST
Comment on attachment 17799 [details]
do not crash on job cancel

Clearing review flag in favour of the Vector-based patch.
Comment 9 Alp Toker 2007-12-09 13:47:49 PST
Comment on attachment 17804 [details]
alternative using vectors

r=me with the changes to the positioning of m_runningJobs increment/decrement we discussed.
Comment 10 Alp Toker 2007-12-09 13:53:17 PST
Landed in r28573.