Post

Replies

Boosts

Views

Activity

Comment on WebKit - WKWebView: How can I control maximumProcessCount of the processPool property?
Hi Quinn, It's only been three years since my original question - apologies. (It's the pandemic's fault.) I'm revisiting this issue, and looking at your original response, you said "Have you tried sharing a process pool between these web views? If you do that then the web views should end up using the same pool, and the pool’s limit will prevent excessive resource use." Can you offer any guidance as to how to do what you suggest? I have no idea how to share a process pool. I'm also trying an alternative solution: I'm using a singleton for the WKWebView, and that works, but I need to change where the WKWebView is seen, without modifying its content - kinda like changing its superview. That's not quite working, but I don't know if that's because it's impossible, or I'm just not doing it correctly yet. Also, I'm kinda old-school, using Objective-C on MacOS. I'm willing to try struggling with Swift, but if you can help an OG Mac guy, that would be awesome. Thanks... HS
Dec ’21
Comment on WebKit - WKWebView: How can I control maximumProcessCount of the processPool property?
Hi Quinn, This is really helpful - THANKS! I'm working on your suggestion for using a single processPool, shared amongst Many WKWebViews. It's getting there, but I have some related questions: My instinct for creating a single shared processPool is to create a simple class as a singleton, with nothing in it but the processPool, and share that. Does this make sense, or is there a better (simpler?) way? I'm trying to add items to the contextual menu for the WKWebView. Can you offer any guidance on this? I was able to do this in WebView, but I don't see how to do it in WKWebView. For clarity, I'm using the WKWebView to display some live web content in one part of a splitView, but I want the user to NOT be able to interact with that content (other than scrolling it, and maybe going back or reloading via default contextual menu items - there's no navigation UI). Again, many thanks for your first response, and if you can help further, you'll make an aging coder very happy. Cheers, HS
Dec ’21