# HG changeset patch # User Nicolas Chauvat # Date 1248806333 -7200 # Node ID 88595be9087da666a27fa33891b566c832265521 # Parent c7b736929a58777621637765bda43a332f969317 [doc] #306434: say a word about optimization diff -r c7b736929a58 -r 88595be9087d doc/book/en/admin/setup.rst --- a/doc/book/en/admin/setup.rst Tue Jul 28 20:26:45 2009 +0200 +++ b/doc/book/en/admin/setup.rst Tue Jul 28 20:38:53 2009 +0200 @@ -199,13 +199,17 @@ MySql configuration ``````````````````` -Yout must add the following lines in /etc/mysql/my.cnf file:: +Yout must add the following lines in ``/etc/mysql/my.cnf`` file:: transaction-isolation = READ-COMMITTED default-storage-engine=INNODB default-character-set=utf8 max_allowed_packet = 128M +.. note:: + It is unclear whether mysql supports indexed string of arbitrary lenght or + not. + Pyro configuration ------------------ diff -r c7b736929a58 -r 88595be9087d doc/book/en/development/index.rst --- a/doc/book/en/development/index.rst Tue Jul 28 20:26:45 2009 +0200 +++ b/doc/book/en/development/index.rst Tue Jul 28 20:38:53 2009 +0200 @@ -18,3 +18,4 @@ testing/index migration/index webstdlib/index + profiling/index diff -r c7b736929a58 -r 88595be9087d doc/book/en/development/profiling/index.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/book/en/development/profiling/index.rst Tue Jul 28 20:38:53 2009 +0200 @@ -0,0 +1,54 @@ +Profiling and performance +========================= + +If you feel that one of your pages takes more time than it should to be +generated, chances are that you're making too many RQL queries. Obviously, +there are other reasons but experience tends to show this is the first thing to +track down. Luckily, CubicWeb provides a configuration option to log RQL +queries. In your ``all-in-one.conf`` file, set the **query-log-file** option:: + + # web application query log file + query-log-file=~/myapp-rql.log + +Then restart your application, reload your page and stop your application. +The file ``myapp-rql.log`` now contains the list of RQL queries that were +executed during your test. It's a simple text file containing lines such as:: + + Any A WHERE X eid %(x)s, X lastname A {'x': 448} -- (0.002 sec, 0.010 CPU sec) + Any A WHERE X eid %(x)s, X firstname A {'x': 447} -- (0.002 sec, 0.000 CPU sec) + +The structure of each line is:: + + --