[TYPO3-core] RFC #14997: Performance: t3lib_db->escapeStrForLike() is using preg_replace, which is not necessary
Xavier Perseguers
typo3 at perseguers.ch
Mon Jul 5 08:30:23 CEST 2010
Hi Caspar,
> Type: Performance
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=14997
>
> Branches:
> Trunk
>
> Problem:
> The function t3lib_db->escapeStrForLike() is using preg_replace to escape
> the values '%' and '_' with a '\' for a sql-like-statement.
> preg_replace takes a lot of recources and is not necessary for such a
> simple replacement.
>
> Solution:
> use str_replace instead.
First of all, thanks for your different DB patches.
I'll have a look at all those DB-related patch soon.
May I kindly ask you to create .diff files instead of .patch and make
sure they are attached as text/plain to your posts? This helps a lot
with mail readers such as Thunderbird or Postbox that allow inline
viewing of text attachments with syntax highlighting.
Regards
Xavier
More information about the TYPO3-team-core
mailing list