|
|
| Line 44: |
Line 44: |
| Efficiency: *** | | Efficiency: *** |
|
| |
|
| Principle: Si vous utilisez une base de données Mysql, vérifiez dans votre fichier de configuration Dolibarr htdocs/conf/conf.php que vous avez bien la ligne | | Principle: If you use a mysql database, check into your Dolibarr config file htdocs/conf/conf.php that you have the line |
| <source lang="php"> | | <source lang="php"> |
| $dolibarr_main_db_type='mysqli'; | | $dolibarr_main_db_type='mysqli'; |
| </source> | | </source> |
| Si la valeur vaut '''mysql''', changez la en '''mysqli''' qui donne de meilleures performances (gain de 30ms à chaque page).
| | If value is '''mysql''', change it into '''mysqli''' that provide better performances (gain is 30ms for each page call). |
|
| |
|
| == Search on beginning of field == | | == Search on beginning of field == |
| Line 56: |
Line 56: |
|
| |
|
| = Other solutions = | | = Other solutions = |
| == Cache applicatif via la Shared memory == | | == Applicative cache using Shared memory == |
| Efficiency: **** | | Efficiency: **** |
|
| |
|
| Pre-requisites: Using an Apache web server | | Pre-requisites: Using an Apache web server |
|
| |
|
| Principle: Ajouter dans '''Accueil-Configuration-Divers''' la constante MAIN_OPTIMIZE_SPEED. Si la valeur de cette constante a le bit 1 défini (Exemple: MAIN_OPTIMIZE_SPEED=2), la shared memory de votre OS est utilisée pour mettre en cache les fichiers lang, mais cela implique aussi que tout l'interface ne sera visible que dans une seule langue, celle du premier qui se connecte après un redémarrage du serveur web (qui charge les fichiers langues en cache). Utiliser plutôt le [[Module MemCached]] pour une optimisation par un cache applicatif qui n'a aucune de ces contraintes et est encore plus performant. | | Principle: Add into '''Home-Setup-Other''' the constant MAIN_OPTIMIZE_SPEED. If value of constant has bit 1 set, Dolibarr will use shared memory to cache translation of language files. This means that only one language can be used (the one defined by first user that log after the Apache server reboot). Use [[Module MemCached EN]] that has no limitations instead of this option and is more efficient. |
|
| |
|
| == Use precompressed version of Javascript libraries == | | == Use precompressed version of Javascript libraries == |
| Efficiency: * | | Efficiency: * |
|
| |
|
| Pre-requisites: Need to edit Aapche setup. | | Pre-requisites: Need to edit Apache setup. |
|
| |
|
| Principle: Ajouter dans '''Accueil-Configuration-Divers''' la constante MAIN_OPTIMIZE_SPEED. Si la valeur de cette constante a le bit 0 défini (Exemple: MAIN_OPTIMIZE_SPEED=1), Dolibarr utilisera les versions pré-compressées des scripts javascripts. A utiliser si votre connexion est lente. | | Principle: Add into '''Home-Setup-Other''' the constant MAIN_OPTIMIZE_SPEED. If value of constant has bit 0 set, Dolibarr will use the minifying and compressed version of javascript. Apache server must be configured to have the line |
| Le serveur Apache doit alors être configuré avec les lignes
| |
| <source lang="ini"> | | <source lang="ini"> |
| AddType text/javascript .jgz | | AddType text/javascript .jgz |
| AddEncoding gzip .jgz | | AddEncoding gzip .jgz |
| </source> | | </source> |
| Ensuite vider son cache navigateur.
| | Then clean your cach brwoser. |
| Cette optimisation semble ne pas fonctionner en HTTPS (erreur de sécurité pour une raison indéterminée).
| | This feature seems to fails on HTTPS (security error for an unknown reason). |
|
| |
|
| == Compressing on the fly libraries and css == | | == Compressing on the fly libraries and css == |
| Efficiency: * | | Efficiency: * |
|
| |
|
| Principle: Ajouter dans '''Accueil-Configuration-Divers''' la constante MAIN_OPTIMIZE_SPEED. Si la valeur de cette constante a le bit 2 défini (Exemple: MAIN_OPTIMIZE_SPEED=4), Dolibarr renverra les pages compressés en GZ (et si le navigateur le supporte). Cela consomme plus de CPU sur le serveur mais réduit le temps de transfert. | | Principle: Add into '''Home-Setup-Other''' the constant MAIN_OPTIMIZE_SPEED. If value of constant has bit 2 defined (Example: MAIN_OPTIMIZE_SPEED=4), Dolibarr will return pages compressed into GZ (and if browser support it). This consume more CPU on server but reduce transfer time. Use it with slow connexion. |
|
| |
|
|
| |
|
|
| |
|
| Note: Pour obtenir la totalité des optimisations utilisant MAIN_OPTIMIZE_SPEED, il faut activer tous les bits (Exemple: MAIN_OPTIMIZE_SPEED=7 donc 1+2+4 contient le bit 0, 1 et 2). | | Note: To enable all optimization using MAIN_OPTIMIZE_SPEED, you must enable all bits (Example: MAIN_OPTIMIZE_SPEED=7 so 1+2+4 contains bit 0, 1 and 2). |
| | |
| | |
| | |
| | |
| | |
| If value of constant has bit 0 set, Dolibarr will use the minifying and compressed version of javascript. Apache server must be configured to have the line
| |
| <source lang="ini">
| |
| AddType text/javascript .jgz
| |
| AddEncoding gzip .jgz
| |
| </source>
| |
| This feature seems to fails on HTTPS (security error for an unknown reason).
| |
| | |
| - If value of constant has bit 1 set, Dolibarr will use shared memory to cache translation of language files. This means that only one language can be used (the one defined by first user that log after the Apache server reboot). Use [[Module MemCached EN]] that has no limitations instead of this option.
| |
| | |
| - If value of constant has bit 2 defined (Example: MAIN_OPTIMIZE_SPEED=4), Dolibarr will return pages compressed into GZ (and if browser support it). This consume more CPU on server but reduce transfer time. Use it with slow connexion.
| |
| | |
| - To have all optimizations enabled, you must set all bits (Example: MAIN_OPTIMIZE_SPEED=7).
| |
| | |
| - Rem: To increase performance, you can also set your apache to activate cache of resources by adding the directives:
| |
| <source lang="ini">
| |
| # Cache for static resources (Enable expiration and set it to A2592000 = 1 month)
| |
| ExpiresActive On
| |
| ExpiresByType image/x-icon A2592000
| |
| ExpiresByType image/gif A2592000
| |
| ExpiresByType image/png A2592000
| |
| ExpiresByType image/jpeg A2592000
| |
| ExpiresByType text/css A2592000
| |
| ExpiresByType text/javascript A2592000
| |
| ExpiresByType application/x-javascript A2592000
| |
| ExpiresByType application/javascript A2592000
| |
| </source>
| |