After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668578 - Add EphySnapshotService
Add EphySnapshotService
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-24 14:10 UTC by Claudio Saavedra
Modified: 2012-09-20 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a service for snapshotting webpages (11.02 KB, patch)
2012-01-24 14:10 UTC, Claudio Saavedra
none Details | Review
Add basic tests for EphySnapshotService (3.66 KB, patch)
2012-01-24 14:10 UTC, Claudio Saavedra
none Details | Review
Add a service for snapshotting webpages (11.58 KB, patch)
2012-02-24 15:33 UTC, Claudio Saavedra
none Details | Review
Add basic tests for EphySnapshotService (3.58 KB, patch)
2012-02-24 15:33 UTC, Claudio Saavedra
none Details | Review
Add a service for snapshotting webpages (17.29 KB, patch)
2012-04-10 16:15 UTC, Claudio Saavedra
none Details | Review
Add basic tests for EphySnapshotService (9.76 KB, patch)
2012-04-10 16:20 UTC, Claudio Saavedra
none Details | Review

Description Claudio Saavedra 2012-01-24 14:10:04 UTC
We need this for the overview. The service is quite simple and the commit
messages explain it well enough.
Comment 1 Claudio Saavedra 2012-01-24 14:10:06 UTC
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.
Comment 2 Claudio Saavedra 2012-01-24 14:10:10 UTC
Created attachment 205982 [details] [review]
Add basic tests for EphySnapshotService
Comment 3 Claudio Saavedra 2012-01-24 14:14:48 UTC
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.
Comment 4 Claudio Saavedra 2012-01-24 15:22:01 UTC
WebKit fix for such bug is in https://bugs.webkit.org/show_bug.cgi?id=76911
Comment 5 Claudio Saavedra 2012-02-24 15:33:15 UTC
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.
Comment 6 Claudio Saavedra 2012-02-24 15:33:18 UTC
Created attachment 208356 [details] [review]
Add basic tests for EphySnapshotService
Comment 7 Claudio Saavedra 2012-04-10 16:15:04 UTC
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.
Comment 8 Claudio Saavedra 2012-04-10 16:20:11 UTC
Created attachment 211766 [details] [review]
Add basic tests for EphySnapshotService
Comment 9 Xan Lopez 2012-06-18 12:22:50 UTC
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 10 Xan Lopez 2012-09-20 15:38:28 UTC
Comment on attachment 211766 [details] [review]
Add basic tests for EphySnapshotService

This landed already.
Comment 11 Xan Lopez 2012-09-20 15:38:34 UTC
Comment on attachment 211765 [details] [review]
Add a service for snapshotting webpages

This landed already.
Comment 12 Xan Lopez 2012-09-20 15:38:46 UTC
Closing.