diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2016-06-08 13:29:52 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2016-06-08 13:43:02 +0900 |
commit | 381a0e3b62a8d63cc5a1cb5c9c3723e3c785bc19 (patch) | |
tree | 2871802e8db474fd04b8b6f6ba2042a391ebb985 | |
parent | 29c36a44017329eb1eca3727aee7cbbbd1184b60 (diff) | |
download | libsoup-381a0e3b62a8d63cc5a1cb5c9c3723e3c785bc19.tar.gz libsoup-381a0e3b62a8d63cc5a1cb5c9c3723e3c785bc19.tar.bz2 libsoup-381a0e3b62a8d63cc5a1cb5c9c3723e3c785bc19.zip |
Pre-load the default system TLS database
[Problem] For the first time to load https websites, axtra time(300ms) is consumed
[Cause] When refer to the TLS database set by upstream, 'set_tlsdb' will check
whether the default system database is used. Because the default system TLS db
is singleton and not created once, so in 'set_tlsdb', it consume the axtra time
[Solution] Pre-load the default system database togther with the used TLS database
Change-Id: I2e13156570d3d468c36664e439721b1a8ceae41d
Signed-off-by: qi1988.yang <qi1988.yang@samsung.com>
-rwxr-xr-x | libsoup/soup-session.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c index a11c1084..36e4b5b2 100755 --- a/libsoup/soup-session.c +++ b/libsoup/soup-session.c @@ -3112,6 +3112,8 @@ _preload_tlsdb_thread (gpointer p) TIZEN_LOGI("Create new tls database by using thread."); g_assert (_gTlsDB_path); _gTlsDB = g_tls_file_database_new (_gTlsDB_path, &error); + //Pre-load the default TLS database + g_tls_backend_get_default_database (g_tls_backend_get_default()); g_mutex_unlock (&_gTlsDB_lock); return NULL; |