Optimization

From Daxipedia

Jump to: navigation, search


[edit] Performance Optimization in v 1.1

Load time in v 1.1 has been significantly improved by the introduction of compression for certain files.


The following changes have been made in v1.1:

  • Compress the JavaScript into one file (1.1MB -> 110KB)
  • Compress each of the CSS files separately (80KB -> 12KB each)
  • Place these compressed files into the Extras/Support folder
  • Keep the same web folder ('dax') structure we have now


The way it will work is the index.html file (and localized versions) are modified to load the compressed JS and CSS. If the browser does not send the header that it can accept gz files we will send the regular ones (this is why we put both compressed and regular files in the Extras/Support folder).


So in v1.1, the application will default to compressed files for increased speed, and require the developer to make small changes if they want to hack around in the framework files.

If a developer wants to use the uncompressed version they need to:

  • Open the index.html in a text editor (or localized index file)
  • Change the JavaScript include lines from:
<script language="javascript" type="text/javascript" charset="utf-8" src="dax/js/localization/resources_en.js"></script>
<script language="javascript" type="text/javascript" charset="ISO-8859-1" src="dax/js/compile.js"></script>

To:

<script language="javascript" type="text/javascript" charset="ISO-8859-1" src="dax/js/framework.js"></script>
<script language="javascript" type="text/javascript" charset="ISO-8859-1" src="dax/js/dax.js"></script>
  • Change each of the stylesheet include lines to remove '_gz' from the name of the stylesheet.

From:

<link rel="stylesheet" charset="ISO-8859-1" href="dax/themes/basic/basic_gz.css" media="all" type="text/css" title="XPress" />

To:

<link rel="stylesheet" charset="ISO-8859-1" href="dax/themes/basic/basic.css" media="all" type="text/css" title="XPress" />
Personal tools