perfs + new database access
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Tue, 28 Dec 2004 12:50:49 +0000 (12:50 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:26:55 +0000 (23:26 +0200)
commitc772341d14573bd9b657aefab19919a5cdf9aa0d
tree34cbb704dce84ff61f97f2084e124bae039190d5
parent2ff6e1b7d8a0e9df21f3aef1242b012df300a0a3
perfs + new database access

 * improve perfs wrt html escaping :
    1. I do NOT understand php refs at all : call by ref seems to be slower than call by value !?
    2. Based on (1), escape_html do not pass args by refs, but by value.
       -> 25% of pure speed gain on mescontacts.php

 * create {iterate ...} compiler function :
    - works like {foreach} but you give a XOrgIterator for 'from'
    - very very very nice for database lazy copying (we don't need mysql_assign anymore).
    - mescontacts.php as a proof of concept.

 * database access class :
    - SQL abstractors sux, they are too complex
    - drupal has nice things, I've inspired myself. The desired things are :
        . drop magic_quotes_gpc
        . maybe have one day some features wrt table names (some ACLs ?)
        -> for that, our tiny engine is enough.
        -> if it's sexy enough, I plan to make it enter diogenes.
    - create SQL Iterators.  nice, clears the mysql_datas.
        -> make them lazy would be great though (memory ...)

git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-154
htdocs/carnet/mescontacts.php
include/xorg.globals.inc.php.in
include/xorg.inc.php
include/xorg/database.inc.php [new file with mode: 0644]
include/xorg/iterator.inc.php [new file with mode: 0644]
include/xorg/page.inc.php
include/xorg/smarty.plugins.inc.php
plugins/compiler.iterate.php [new file with mode: 0644]
templates/carnet/mescontacts.tpl