GNOME Bugzilla – Bug 724862
Improve performance of about pages
Last modified: 2014-02-21 12:13:10 UTC
We can improve the way we are loading the resources used by about pages like images and css.
Created attachment 269881 [details] [review] about-handler: Do not send encoded images to the web process in about:web Pass the icon filename instead.
Created attachment 269882 [details] [review] about-handler: Do not send encoded images to the web process in about:applications Pass the app icon filename instead.
Created attachment 269883 [details] [review] Add ephy-resource:// custom URI scheme implementation Ideally we could use resource:// URIs since they are supported by both WebKit and libsoup, but the web process doesn't have access to the resources compiled in the UI process. And in multiprocess mode, the network process doesn't have access to the resources either. ephy-resource:// URIs are like a proxy to load gresources compiled in the UI process, the data is sent directly to the web process in single process mode or to the network process in multiprocess mode.
Created attachment 269884 [details] [review] about-handler: Use ephy-resource for the incognito icon in about:incognito Instead of decoding the image and send it to the web process.
Created attachment 269885 [details] [review] overview: Compile the missing thumbnail icon as a gresource And use it directly form the css using ephy-resource URI.
Created attachment 269886 [details] [review] about-handler: Compile the about css file as a gresource And use a link to the resource in the about pages instead of including the file contents in the about page.
Review of attachment 269881 [details] [review]: ::: embed/ephy-about-handler.c @@ +296,3 @@ "<body>" "<div class=\"dialog\">" + "<img src=\"file://%s\"/>" Will this work fine if the string is empty?
Review of attachment 269882 [details] [review]: OK
Review of attachment 269883 [details] [review]: Looks good.
(In reply to comment #7) > Review of attachment 269881 [details] [review]: > > ::: embed/ephy-about-handler.c > @@ +296,3 @@ > "<body>" > "<div class=\"dialog\">" > + "<img src=\"file://%s\"/>" > > Will this work fine if the string is empty? That's what current code does, the resource will fail to load and you won't see any image. We can do it better, of course, but it's a different bug.
Review of attachment 269884 [details] [review]: Good.
Review of attachment 269885 [details] [review]: OK
Review of attachment 269886 [details] [review]: OK
(In reply to comment #10) > (In reply to comment #7) > > Review of attachment 269881 [details] [review] [details]: > > > > ::: embed/ephy-about-handler.c > > @@ +296,3 @@ > > "<body>" > > "<div class=\"dialog\">" > > + "<img src=\"file://%s\"/>" > > > > Will this work fine if the string is empty? > > That's what current code does, the resource will fail to load and you won't see > any image. We can do it better, of course, but it's a different bug. Just wondering whether it's OK to have <img src="file://" /> there.
(In reply to comment #14) > (In reply to comment #10) > > (In reply to comment #7) > > > Review of attachment 269881 [details] [review] [details] [details]: > > > > > > ::: embed/ephy-about-handler.c > > > @@ +296,3 @@ > > > "<body>" > > > "<div class=\"dialog\">" > > > + "<img src=\"file://%s\"/>" > > > > > > Will this work fine if the string is empty? > > > > That's what current code does, the resource will fail to load and you won't see > > any image. We can do it better, of course, but it's a different bug. > > Just wondering whether it's OK to have <img src="file://" /> there. I think we should skip the <img> entirely in case the icon is not found
Comment on attachment 269881 [details] [review] about-handler: Do not send encoded images to the web process in about:web Will fix the case where the icon is not found in a different commit