Re: knowing when WebView is done
Re: knowing when WebView is done
- Subject: Re: knowing when WebView is done
- From: Timothy Ritchey <email@hidden>
- Date: Sun, 15 Jun 2008 19:34:42 -0400
Many thanks to Adam for his code, which helped to trim down the way
WebKit was working for me, especially the bits about turning off
JavaScript, etc. Also, to Keary for walking through the backtrace. In
order to keep the memory footprint of my application down, I decided
to use a helper app for the thumbnail rendering. For anyone
interested, I've got a short writeup here:
<http://redromelogic.com/blog/display?id=41>
along with a zip file of the two classes that comprise the helper
application and the controller in the main application.
Cheers,
Tim R.
On Jun 7, 2008, at 11:02 AM, Adam R. Maxwell wrote:
On Jun 7, 2008, at 6:26 AM, Timothy Ritchey wrote:
On Jun 7, 2008, at 1:32 AM, Adam R. Maxwell wrote:
From a quick check with Instruments, it looks like internal WebKit
stuff is retaining the view for callbacks even after it's done
loading, then releasing it on a later pass through the runloop. I
wouldn't worry about it unless you're actually leaking the object.
From what I can tell by watching several instrument runs, it seems
like WebKit is internally caching stuff. If I go to cnn.com, I see
a major memory bump, but I can go to it again and again and not see
any increase, but when I go to a new website, say digg.com, I see
another memory bump again. Even if I let the application run for a
while, it never seems to go back down. The only reason I am using
webkit is to grab these thumbnails, which happens once, and need to
be refreshed very rarely, if ever. I'm trying to read up on how to
alter the caching behavior of WebKit now.
Sounds like we have similar usage scenarios. You have to read the
header to find out about caching behavior, but I set it to
WebCacheModelDocumentViewer for lowest memory usage, since I draw
the webview to a bitmap and never load it again. I also set the
WebView prefs to disable plugins and other stuff as well; the code
is all BSD licensed, if you're curious.
http://tcobrowser.svn.sf.net/svnroot/tcobrowser/trunk/bibdesk/vendorsrc/amaxwell/FileView/FVWebViewIcon.m
--
Adam
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden