PHP related blog, freelancer to hire!

Posts Tagged ‘optimisation’

Logging page rendering time in Symfony 1.xx

Change your SF_APP/web/index.php file to be: $timer = sfTimerManager::getTimer(‘myTimer’); sfContext::getInstance()->getController()->dispatch(); $timer->addTime(); $elapsedTime = $timer->getElapsedTime(); $fullRealUri = str_replace( sfContext::getInstance()->getRequest()->getUriPrefix(), “”, sfContext::getInstance()->getRequest()->getUri()); file_put_contents(‘/tmp/time.log’,date(‘Y-m-d H:i:s’).”|$fullRealUri|$elapsedTime\n\r”,FILE_APPEND);

Read more

Online CSS and JS compressor – save your visitor time

Today I needed to reduce size of CSS and JS which was almost 400Kb all together. Spending some time found usefull tools for it. http://iceyboard.no-ip.org/projects/css_compressor and http://dojotoolkit.org/docs/shrinksafe are winners Before compressing javascript file make sure that You don’t have anything compressed already there, all lines are ending with

Read more

Latest Posts

On twitter...

Posting tweet...

Powered by Twitter Tools