============
Optimization
============

Rendering
---------

For better performance considering optimize :ref:`Photo Assets <Assets>`. 

Additionally split photos into different categories where each category remains maximum of 20 - 30 items may help increasing framerate.

Compressed Javascript
---------------------

The grunt task **compress** will produce the gzipped version of the minifed application file (*sg3d.min.js*) which may save up to 40% the total filesize
and help speed up browser loading time. 

To use gzip file as a script source, the server must set up the response header with "Content-Encoding: gzip" entry included, along with the gzipped file as its payload.
Most modern browsers will be able to decompress the file and execute the script in the client side.