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 724862 - Improve performance of about pages
Improve performance of about pages
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-21 09:50 UTC by Carlos Garcia Campos
Modified: 2014-02-21 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
about-handler: Do not send encoded images to the web process in about:web (2.67 KB, patch)
2014-02-21 09:52 UTC, Carlos Garcia Campos
committed Details | Review
about-handler: Do not send encoded images to the web process in about:applications (2.23 KB, patch)
2014-02-21 09:52 UTC, Carlos Garcia Campos
committed Details | Review
Add ephy-resource:// custom URI scheme implementation (2.56 KB, patch)
2014-02-21 09:52 UTC, Carlos Garcia Campos
committed Details | Review
about-handler: Use ephy-resource for the incognito icon in about:incognito (3.19 KB, patch)
2014-02-21 09:52 UTC, Carlos Garcia Campos
committed Details | Review
overview: Compile the missing thumbnail icon as a gresource (3.84 KB, patch)
2014-02-21 09:52 UTC, Carlos Garcia Campos
committed Details | Review
about-handler: Compile the about css file as a gresource (11.34 KB, patch)
2014-02-21 09:52 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2014-02-21 09:50:56 UTC
We can improve the way we are loading the resources used by about pages like images and css.
Comment 1 Carlos Garcia Campos 2014-02-21 09:52:30 UTC
Created attachment 269881 [details] [review]
about-handler: Do not send encoded images to the web process in about:web

Pass the icon filename instead.
Comment 2 Carlos Garcia Campos 2014-02-21 09:52:34 UTC
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.
Comment 3 Carlos Garcia Campos 2014-02-21 09:52:39 UTC
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.
Comment 4 Carlos Garcia Campos 2014-02-21 09:52:43 UTC
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.
Comment 5 Carlos Garcia Campos 2014-02-21 09:52:47 UTC
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.
Comment 6 Carlos Garcia Campos 2014-02-21 09:52:52 UTC
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.
Comment 7 Claudio Saavedra 2014-02-21 11:22:54 UTC
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?
Comment 8 Claudio Saavedra 2014-02-21 11:24:06 UTC
Review of attachment 269882 [details] [review]:

OK
Comment 9 Claudio Saavedra 2014-02-21 11:27:03 UTC
Review of attachment 269883 [details] [review]:

Looks good.
Comment 10 Carlos Garcia Campos 2014-02-21 11:27:42 UTC
(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.
Comment 11 Claudio Saavedra 2014-02-21 11:28:09 UTC
Review of attachment 269884 [details] [review]:

Good.
Comment 12 Claudio Saavedra 2014-02-21 11:28:51 UTC
Review of attachment 269885 [details] [review]:

OK
Comment 13 Claudio Saavedra 2014-02-21 11:30:01 UTC
Review of attachment 269886 [details] [review]:

OK
Comment 14 Claudio Saavedra 2014-02-21 11:31:14 UTC
(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.
Comment 15 Carlos Garcia Campos 2014-02-21 11:40:48 UTC
(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 16 Carlos Garcia Campos 2014-02-21 12:11:48 UTC
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