New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache explosion issue due to css in style tags #535

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 6 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 6, 2015

visit any site with large numbers of background-images in inline style tags.  
E.g. 

<h2 style="background-image:url(http://example.com/images/image1.png);">

Each one of these entries results in a small metadata cache entry.  
Additionally, due to the way we compute the cache key, if the same 
background-image is used in web pages with multiple paths, we will get distinct 
entries for each path.

This can be resolved by abstaining to write a metadata cache entry for such 
inline style attributes.  We should, of course, write the metadata cache entry 
for the image.

Of course we must plumb css_filter.cc/rewrite_context.cc to do the image 
substitution during the HTML rewrite.

Original issue reported on code.google.com by jmara...@google.com on 17 Oct 2012 at 3:04

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Workaround for this issue:
   ModPagespeedDisableFilters rewrite_style_attributes,rewrite_style_attributes_with_url

Of course that filter is high-value and it might be worth the disk space to let 
it run, and instead it might be better to work around 
http://code.google.com/p/modpagespeed/issues/detail?id=536 by lowering the disk 
space setting (until that bug is fixed) or increasing the size of the disk 
partition used to store the cache.

Original comment by jmara...@google.com on 17 Oct 2012 at 3:09

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by jmara...@google.com on 17 Oct 2012 at 8:05

  • Added labels: Milestone-v23, release-note
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Should hopefully be fixed by r2083

Original comment by morlov...@google.com on 23 Oct 2012 at 4:56

  • Changed state: Started
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

How can we verify this fix so that we can close this issue?

Original comment by matterb...@google.com on 30 Oct 2012 at 5:30

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

The reported confirmed a 10x reduction in file use --- it's still very high, 
but probably satisfactory to consider this fixed.

Original comment by morlov...@google.com on 30 Oct 2012 at 5:48

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Fix deployed in production at englishcentral.com, found that overall cache size 
settles in around 250mb instead of 2gb previously.

Original comment by jon.mars...@englishcentral.com on 30 Oct 2012 at 6:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment