Merge branch 'wip/conditional-webkit-shared-proc' into 'mainline'
Conditionally enable WebKitGTK shared secondary process model See merge request GNOME/geary!305
This commit is contained in:
commit
9b3eb0eb21
2 changed files with 15 additions and 0 deletions
|
|
@ -76,6 +76,11 @@ public abstract class ClientWebView : WebKit.WebView, Geary.BaseInterface {
|
|||
File cache_dir) {
|
||||
WebsiteDataManager data_manager = new WebsiteDataManager(cache_dir.get_path());
|
||||
WebKit.WebContext context = new WebKit.WebContext.with_website_data_manager(data_manager);
|
||||
#if HAS_WEBKIT_SHARED_PROC
|
||||
// Use a shared process so we don't spawn N WebProcess instances
|
||||
// when showing N messages in a conversation.
|
||||
context.set_process_model(WebKit.ProcessModel.SHARED_SECONDARY_PROCESS);
|
||||
#endif
|
||||
// Use the doc viewer model since each web view instance only
|
||||
// ever shows a single HTML document.
|
||||
context.set_cache_model(WebKit.CacheModel.DOCUMENT_VIEWER);
|
||||
|
|
|
|||
|
|
@ -148,6 +148,16 @@ if libunity.found()
|
|||
geary_client_vala_options += ['-D', 'HAVE_LIBUNITY']
|
||||
endif
|
||||
|
||||
# Enable shared shecondary process if available.
|
||||
# See issues #558 and #559
|
||||
webkit_version = webkit2gtk.version().split('.')
|
||||
if webkit_version[0].to_int() <= 2 and webkit_version[1].to_int() <= 24
|
||||
message('Enabling WebKitGTK shared process model')
|
||||
geary_client_vala_options += [
|
||||
'-D', 'HAS_WEBKIT_SHARED_PROC'
|
||||
]
|
||||
endif
|
||||
|
||||
# Main client application library
|
||||
geary_client_lib = static_library('geary-client',
|
||||
geary_client_sources,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue