Documentation for Pagespeed ? (arch/code level)

13 views
Skip to first unread message

kapil kumar

unread,
May 4, 2016, 9:23:56 AM5/4/16
to mod-pagespeed-discuss
Hi all,
Is there any documentation available for the Pagespeed , which explains :
-architecture
-main modules
-code flow
-sample interface to use PS (like used in ATS plugin)

But its not enough to start the understanding of in depth details :(

Any pointer will be helpful :)

Joshua Marantz

unread,
May 4, 2016, 9:29:39 AM5/4/16
to mod-pagespeed-discuss
Not enough.  But start with this:http://modpagespeed.jmarantz.com/

You can also check the doxygen-generated doc: http://modpagespeed.com/psol/namespacenet__instaweb.html but it's more of an index into the class structure & comments, and does not cover the flow from a high level.

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/5a9732e3-fa42-4442-a06d-8159be453669%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kapil kumar

unread,
May 4, 2016, 9:45:38 AM5/4/16
to mod-pagespeed-discuss
Thanks a lot, a good one to start with :)

Would love to see more on this, as its very useful for beginners like me.


On Wednesday, 4 May 2016 18:59:39 UTC+5:30, jmarantz wrote:
Not enough.  But start with this:http://modpagespeed.jmarantz.com/

You can also check the doxygen-generated doc: http://modpagespeed.com/psol/namespacenet__instaweb.html but it's more of an index into the class structure & comments, and does not cover the flow from a high level.

-Josh
On Wed, May 4, 2016 at 9:23 AM, kapil kumar <kapil...@gmail.com> wrote:
Hi all,
Is there any documentation available for the Pagespeed , which explains :
-architecture
-main modules
-code flow
-sample interface to use PS (like used in ATS plugin)

But its not enough to start the understanding of in depth details :(

Any pointer will be helpful :)

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
May 4, 2016, 10:05:58 AM5/4/16
to mod-pagespeed-discuss
Another nice post is from Jeff: https://www.jefftk.com/p/ngx-pagespeed-how-does-it-work
This post explains about how pagespeed is integrated with nginx. It may be slightly dated, but the interfaces used are the same as the ATS plugin.

Otto

On Wed, May 4, 2016 at 3:45 PM, kapil kumar <kapil...@gmail.com> wrote:
Thanks a lot, a good one to start with :)

Would love to see more on this, as its very useful for beginners like me.


On Wednesday, 4 May 2016 18:59:39 UTC+5:30, jmarantz wrote:
Not enough.  But start with this:http://modpagespeed.jmarantz.com/

You can also check the doxygen-generated doc: http://modpagespeed.com/psol/namespacenet__instaweb.html but it's more of an index into the class structure & comments, and does not cover the flow from a high level.

-Josh
On Wed, May 4, 2016 at 9:23 AM, kapil kumar <kapil...@gmail.com> wrote:
Hi all,
Is there any documentation available for the Pagespeed , which explains :
-architecture
-main modules
-code flow
-sample interface to use PS (like used in ATS plugin)

But its not enough to start the understanding of in depth details :(

Any pointer will be helpful :)

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/a6274b54-fc31-445c-9cf7-2d318d529834%40googlegroups.com.

Maksim Orlovich

unread,
May 5, 2016, 12:13:30 PM5/5/16
to mod-pagesp...@googlegroups.com
Some high-level class highlights that may of some use:
RewriteDriverFactory: gets subclassed to provide platform-specific
things, for things like
threads, caches, timers, http fetching, etc.
SystemRewriteDriverFactory provides implementations
of most of these things for Linux. There is normally only one of these around.
(Doesn't actually make RewriteDriver's, though)

Scheduler: this runs timers. In Apache, we essentially block threads
running it (since Apache expects you to block when doing
work). in nginx, and other async system, you'd need a thread to run it
(see: SchedulerThread).

RewriteOptions: base class for configuration, usually subclasses by
implementations for own stuff.

ServerContext: corresponds to something like an Apache VHost --- has
RewriteOptions, and actually makes RewriteDrivers,
setting them up with platform stuff based on the RewriteDriverFactory
and its options.

RewriteDriver: Basically, this helps you handle a request, then you
clean it up. There are two main modes: HTML parser, and
resources. In HTML parser, you give it bits of HTML, and it rewrites
them; in resource ones (think .jpeg/.js, etc.) you give it a
URL and it produces a (hopefully) optmized version. Entry point is
Fetch*Resource

ProxyInterface: basically an all-in-one proxy: fetches things, and
optimizes them. It's not normally used for mod_pagespeed
since fetching HTML would be wasteful there (extra connection).

HttpFetch: basically a 'sink' for HTTP things. (see e.g.: ApacheFetch.
SimpleBufferedApacheFetch)
You may need one for your platform if you use ProxyInterface (or
ProxyFetch, with is basically subset of ProxyInterface functionality
minus handling of .pagespeed. rewritten URLs).
> https://groups.google.com/d/msgid/mod-pagespeed-discuss/CAHqmWiPs8baszAj5onRyM6j0kjGP1Qc-J7MhcYYz67UJ%3D%3DR52g%40mail.gmail.com.

kapil kumar

unread,
May 6, 2016, 1:23:22 AM5/6/16
to mod-pagespeed-discuss
Thanks Otto and Maskim, these are really useful to start with.
Although when i started looking, i was searching for documentation like the Chromium project. (in depth details for the all modules :)

Thanks again,
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/mod-pagespeed-discuss/5a9732e3-fa42-4442-a06d-8159be453669%40googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "mod-pagespeed-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/mod-pagespeed-discuss/a6274b54-fc31-445c-9cf7-2d318d529834%40googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "mod-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
Reply all
Reply to author
Forward
0 new messages