Changeset 91954 in webkit


Ignore:
Timestamp:
Jul 28, 2011 4:26:34 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[Soup] Cannot override default max-conns and max-conns-per-host Soup Session settings
https://bugs.webkit.org/show_bug.cgi?id=64355
Default max-conns and max-conns-per-host are set at "first contact" with
a site instead of at creation time. This results in values being
overwritten if they are set prior to said "first contact"; which is the
most likely (or only) scenario.

Patch by Marco Peereboom <marco@peereboom.us> on 2011-07-28
Reviewed by Martin Robinson.

No new tests. Rigged libsoup and xxxterm web browser to diagnose the
issue and validate the patch.

  • platform/graphics/FontFallbackList.cpp:

(WebCore::FontFallbackList::determinePitch):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91943 r91954  
     12011-07-28  Marco Peereboom  <marco@peereboom.us>
     2
     3        [Soup] Cannot override default max-conns and max-conns-per-host Soup Session settings
     4        https://bugs.webkit.org/show_bug.cgi?id=64355
     5        Default max-conns and max-conns-per-host are set at "first contact" with
     6        a site instead of at creation time.  This results in values being
     7        overwritten if they are set prior to said "first contact"; which is the
     8        most likely (or only) scenario.
     9
     10        Reviewed by Martin Robinson.
     11
     12        No new tests.  Rigged libsoup and xxxterm web browser to diagnose the
     13        issue and validate the patch.
     14
     15        * platform/graphics/FontFallbackList.cpp:
     16        (WebCore::FontFallbackList::determinePitch):
     17
    1182011-07-28  Brady Eidson  <beidson@apple.com>
    219
  • trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r89197 r91954  
    145145static void ensureSessionIsInitialized(SoupSession* session)
    146146{
    147     // Values taken from http://stevesouders.com/ua/index.php following
    148     // the rule "Do What Every Other Modern Browser Is Doing". They seem
    149     // to significantly improve page loading time compared to soup's
    150     // default values.
    151     static const int maxConnections = 60;
    152     static const int maxConnectionsPerHost = 6;
    153 
    154147    if (g_object_get_data(G_OBJECT(session), "webkit-init"))
    155148        return;
     
    172165        g_object_unref(requester);
    173166    }
    174 
    175     g_object_set(session,
    176                  SOUP_SESSION_MAX_CONNS, maxConnections,
    177                  SOUP_SESSION_MAX_CONNS_PER_HOST, maxConnectionsPerHost,
    178                  NULL);
    179167
    180168    g_object_set_data(G_OBJECT(session), "webkit-init", reinterpret_cast<void*>(0xdeadbeef));
     
    850838SoupSession* ResourceHandle::defaultSession()
    851839{
    852     static SoupSession* session = soup_session_async_new();
     840    static SoupSession* session = 0;
     841    // Values taken from http://stevesouders.com/ua/index.php following
     842    // the rule "Do What Every Other Modern Browser Is Doing". They seem
     843    // to significantly improve page loading time compared to soup's
     844    // default values.
     845    static const int maxConnections = 60;
     846    static const int maxConnectionsPerHost = 6;
     847
     848    if (!session) {
     849        session = soup_session_async_new();
     850        g_object_set(session,
     851                     SOUP_SESSION_MAX_CONNS, maxConnections,
     852                     SOUP_SESSION_MAX_CONNS_PER_HOST, maxConnectionsPerHost,
     853                     NULL);
     854    }
     855
    853856    return session;
    854857}
Note: See TracChangeset for help on using the changeset viewer.