GNOME Bugzilla – Bug 668578
Add EphySnapshotService
Last modified: 2012-09-20 15:38:46 UTC
We need this for the overview. The service is quite simple and the commit messages explain it well enough.
Created attachment 205981 [details] [review] Add a service for snapshotting webpages This service provides pixbufs for URLs while caching these locally as thumbnails. gnome-desktop-thumbnail is used to handle caching.
Created attachment 205982 [details] [review] Add basic tests for EphySnapshotService
I forgot that this depends on WebKitGTK+ not crashing because of bug 668505. Matthias comments make me think that we need to fix it somehow in WebKit first.
WebKit fix for such bug is in https://bugs.webkit.org/show_bug.cgi?id=76911
Created attachment 208355 [details] [review] Add a service for snapshotting webpages This service provides pixbufs for URLs while caching these locally as thumbnails. gnome-desktop-thumbnail is used to handle caching.
Created attachment 208356 [details] [review] Add basic tests for EphySnapshotService
Created attachment 211765 [details] [review] Add a service for snapshotting webpages This service provides pixbufs for URLs while caching these locally as thumbnails. gnome-desktop-thumbnail is used to handle caching. This new version uses a GAsyncQueue to handle snapshotting requests and process them one by one in a separate thread, only going to the main loop when needed. Also, the GIOJobScheduler thread is used for all IO. The API itself uses GSimpleAsyncResult and supports cancellation. Extra tests were added to test the new features, and the latest version of the overview is already using all this.
Created attachment 211766 [details] [review] Add basic tests for EphySnapshotService
Comments for the code in the 'overview' branch related to this: - Since the snapshotting work is done in the UI thread and the thumbnail saving in an IO thread in the end the scheduling thread barely does nothing. I suggest to get rid of ti and just make the UI thread schedule itself (through a simple queue + idle impl. perhaps). - Not sure constantly creating an offscreen window + web view is actually better wrt memory usage in the long run (think of fragmentation). Having a fixed object to do the snapshotting might be just better/simpler. - The unit tests cannot really use the network (unit tests need to be fast). So wee need to use a local soup server, data: URIs, or something like that to test this. - The thumbnails cannot be persistent when in private mode. Seems we need to patch GnomeThumbnailFactory.
Comment on attachment 211766 [details] [review] Add basic tests for EphySnapshotService This landed already.
Comment on attachment 211765 [details] [review] Add a service for snapshotting webpages This landed already.
Closing.