Ticket #582 (closed Bug: fixed)
css files should only be compressed once
| Reported by: | SuicidalWeasel | Owned by: | gregmac |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.2 |
| Component: | Modules:Media | Version: | SVN HEAD |
| Keywords: | media, css, compress, pack | Cc: |
Description
css is currently being compressed each time a file is appended to the output. This uses multiple preg_replace's per time and is probably a decent performance hit. The data should be packed after all files have been combined, the same as it is in the js function.
foreach ($filedata as $filename=>$data)
{
if ($this->pack_css)
{
$data = $this->css_compress($data);
}
$output .= $data;
}
Should be:
foreach ($filedata as $filename=>$data)
{
$output .= $data;
}
if ($this->pack_css)
{
$output = $this->css_compress($output);
}
Change History
Note: See
TracTickets for help on using
tickets.
