Ticket #582 (closed Bug: fixed)

Opened 5 months ago

Last modified 2 months ago

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

Changed 2 months ago by OscarB

  • status changed from new to closed
  • resolution set to fixed

Changed in r3244 Thanks SuicidalWeasel?!

Note: See TracTickets for help on using tickets.