[TYPO3-core] RFC: T3-speedup preg insted of ereg
Bernhard Kraft
kraftb at kraftb.at
Thu Oct 27 00:12:13 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christian Jul Jensen wrote:
> On Wednesday 26 October 2005 23:52, Bernhard Kraft wrote:
>
>>preg's are faster than ereg's (Don't ask why :) test it).
> PCRE requires external libraries, POSIX doesn't. I'm pretty sure that is why
> POSIX is preferred in the core.
Didn't know that.
Than do a
if (function_exists('preg_match') [
require_once(PATH_t3lib.'class.t3lib_parsehtml_preg.php');
} else {
require_once(PATH_t3lib.'class.t3lib_parsehtml_ereg.php');
}
This speed up everywhere possible without much overhead (each class just loaded/parsed
as needed) with an acellerator you wouldn't notice a difference if the class get's used
directly or like that ....
greets,
Bernhard
- --
- ----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
- ----------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDX/89Il4dkVkDMFkRAr7lAJ47/gIwNhb931pZotTHmJHwNcu4PgCfY4mb
d1hrJIPFsRtnt94wLsVrYTk=
=Wec5
-----END PGP SIGNATURE-----
More information about the TYPO3-team-core
mailing list