php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1327 strtr() very slow
Submitted: 1999-04-19 15:14 UTC Modified: 1999-04-20 01:43 UTC
From: fuf at fuf dot sh dot cvut dot cz Assigned:
Status: Closed Package: Performance problem
PHP Version: 3.0.7 OS: linux-2.2.5-ac3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 - 12 = ?
Subscribe to this entry?

 
 [1999-04-19 15:14 UTC] fuf at fuf dot sh dot cvut dot cz
$converted = strtr($buffer, "<13characters>", "<13characters>");
where <13characters> are 13 characters in iso-8859-2 or windows-1250 encoding. converting approximately 15kb buffer takes 2-3 seconds on a pII 450 with 128mb of ram.

the same conversion can be done from shell with the 'tr' command _instantly_.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-04-20 01:43 UTC] thies
should be fixed in latest cvs - we were using strlen a bit too heavy.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC