Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

cache explosion issue due to css in style tags #535

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

cache explosion issue due to css in style tags #535

GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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

  • Added labels: Milestone-v23, release-note

@GoogleCodeExporter
Copy link
Author

Should hopefully be fixed by r2083

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

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant