[dokuwiki] Re: Performance issues

  • From: "Harry Fuecks" <hfuecks@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 23 Mar 2006 14:01:41 +0100

On 3/23/06, Yann <yann.hamon@xxxxxxxxx> wrote:
> substr() is also wrong for use with unicode... what language are you using
> this code with? english?
>

If you have the mbstring extension installed, you could use mb_substr
(make sure you set encoding to UTF-8).

Failing that I have a faster implementation of utf8_substr in native
PHP here: http://cvs.sourceforge.net/viewcvs.py/phputf8/utf8/native/core.php
(scroll down a bit) - so long as you're not using negative offsets,
should be OK - I've benchmarked it against mbstring and it does pretty
well.

This may not, of course, be the problem. Would suggest installing the
xdebug profiler then profiling the code if users have the right
"cookie" - data captured should give you a pretty good idea of where
the problem it.
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: