On Mon, Aug 31, 2009 at 8:56 AM, Mark Mentovai<m...@chromium.org> wrote:
>  Since these tasks require profile and theme access, the approach is
> to build up the HTML and CSS early, on the UI thread where such access
> is permitted, and cache them.  When a request for the HTML or CSS
> comes in, the browser can then service them entirely on the IO thread.

This cache is in-memory only, right?  That is, it's generated during startup?
(In the past I've talked about caches but I'm worried that the NTP
positioning will jump around due to stale caches, since the site
ranking is based on day granularity.  Though that could be considered
a design flaw.)

> This gets the data into the renderer almost immediately after it's
> requested, so that the renderer is able to fully lay out the new tab
> page without having to wait for the browser to do things like draw the
> new tab.

Another option is for the browser push these resources into the NTP as
it's being constructed.  That is, textually append a <script> tag with
the JSON blob of the NTP data at the bottom of the NTP HTML.  That's
how our translation templating works and it skips all the
back-and-forth of requests.

I believe the only reason it wasn't done that way originally was
because we didn't have the necessary data generated in time, but your
cache fixes it.

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to