Re: [PHP-DEV] Unicode string iterator performance

2006-02-02 Thread Stefan Walk
Andrei Zmievski wrote: On Feb 2, 2006, at 5:21 PM, Ilia Alshanetsky wrote: The real test however would be random character access, rather then sequential scans from start to end :-). How often do you access random characters in a string vs. sequential scans? Which is the more likely scenari

Re: [PHP-DEV] Unicode string iterator performance

2006-02-02 Thread Andrei Zmievski
On Feb 2, 2006, at 5:21 PM, Ilia Alshanetsky wrote: The real test however would be random character access, rather then sequential scans from start to end :-). How often do you access random characters in a string vs. sequential scans? Which is the more likely scenario in PHP scripts? I th

Re: [PHP-DEV] PHP, Apache 2, memory and APC

2006-02-02 Thread Xuefer
think of using fastcgi? u can have more user->httpserver concurrent connection than http->fastcgi. 5-20 php-fastcgi is enough in some case, with thread disabled, while u can run apache2 mpm worker.

Re: [PHP-DEV] PHP Array Literals

2006-02-02 Thread Steph Fox
OK, so 10 years into PHP suddenly we need a new way for people to understand arrays? I think what we have already is good enough. Speaking as an arts grad who came into coding late in life and learned C via PHP... - Steph - Original Message - From: "James Crane" <[EMAIL PROTECTED]>

Re: [PHP-DEV] PHP Array Literals

2006-02-02 Thread James Crane
[Reply below] On 2/2/06, Christian Schneider <[EMAIL PROTECTED]> wrote: > While I would kinda like array literals too (and even had a patch for it > some time ago, don't remember if it was without problems though) the > core developers think that > a) one working solution is enough > b) array() is

Re: [PHP-DEV] PHP Array Literals

2006-02-02 Thread James Crane
So, all I heard as reasons not to introduce the '[]' syntax for creating arrays is because "'array()' is perfectly fine" and that it wouldn't make sense to have two syntaxes (compared to other legacy stuff in PHP). And certainly nobody has an objection to the fact that developers have to learn that

[PHP-DEV] Re: Unicode string iterator performance

2006-02-02 Thread Andrei Zmievski
Cache it where? In the zval or the opcode? What if the string changes? How do you detect that and invalidate the cached position? -Andrei On Feb 2, 2006, at 5:19 PM, Christian Schneider wrote: You could cache the last position (PHP- and Unicode string index) and start from there. This assumes

Re: [PHP-DEV] Unicode string iterator performance

2006-02-02 Thread Ilia Alshanetsky
Andrei, You may see a better performance using the [] if you change your test code to: for ($x = 0; $x < 1; $x++) { $i = 0; while (isset($a[$i])) { $c = $a[$i++]; } } The real test however would be random character access, rather then sequential scans from start to end :-). Ilia A

[PHP-DEV] Re: Unicode string iterator performance

2006-02-02 Thread Christian Schneider
Andrei Zmievski wrote: I am not sure how we can optimize [] to be faster than the iterator approach. Food for thought? You could cache the last position (PHP- and Unicode string index) and start from there. This assumes that most accesses are (more or less) sequential. If you can step backwar

Re: [PHP-DEV] Unicode string iterator performance

2006-02-02 Thread Andrei Zmievski
For yet another comparison, the [] operator test under PHP 4 gives 7.24410 s. - Andrei On Feb 2, 2006, at 4:45 PM, Andrei Zmievski wrote: You probably saw that I have committed initial implementation of TextIterator. The impetus for this is that direct indexing of Unicode strings via [] oper

[PHP-DEV] Unicode string iterator performance

2006-02-02 Thread Andrei Zmievski
You probably saw that I have committed initial implementation of TextIterator. The impetus for this is that direct indexing of Unicode strings via [] operator is slow, very slow, at least currently. The reason is that [] cannot simply perform random-offset indexing into UCHar* strings. It needs

Re: [PHP-DEV] PHP, Apache 2, memory and APC

2006-02-02 Thread Rasmus Lerdorf
Brian Moon wrote: Ilia Alshanetsky wrote: Rather then terminating Apache request yourself, you can use universal Apache configuration directives that allow you to restrict memory utilization of an Apache process. Hmmm, the ones I looked at seemed to prohibit a process from growing above a ce

Re: [PHP-DEV] PHP, Apache 2, memory and APC

2006-02-02 Thread Brian Moon
Ilia Alshanetsky wrote: Rather then terminating Apache request yourself, you can use universal Apache configuration directives that allow you to restrict memory utilization of an Apache process. Hmmm, the ones I looked at seemed to prohibit a process from growing above a certain size. Can yo

Re: [PHP-DEV] PHP, Apache 2, memory and APC

2006-02-02 Thread Ilia Alshanetsky
Rather then terminating Apache request yourself, you can use universal Apache configuration directives that allow you to restrict memory utilization of an Apache process. Ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP, Apache 2, memory and APC

2006-02-02 Thread Rasmus Lerdorf
Brian Moon wrote: I have some questions about the Apache 2 SAPI. We had been using apache_child_terminate to control memory usage with Apache 1.3. This function is not available with the Apache 2 SAPI. Is this function just not offered in the Apache 2 API? If it is offered and there is some

[PHP-DEV] PHP, Apache 2, memory and APC

2006-02-02 Thread Brian Moon
I have some questions about the Apache 2 SAPI. We had been using apache_child_terminate to control memory usage with Apache 1.3. This function is not available with the Apache 2 SAPI. Is this function just not offered in the Apache 2 API? If it is offered and there is some gotcha or simply

[PHP-DEV] Re: cvs: php-src(PHP_5_1) /ext/spl spl_directory.c

2006-02-02 Thread Sebastian Bergmann
Ilia Alshanetsky schrieb: > iliaa Thu Feb 2 15:10:04 2006 UTC > > Modified files: (Branch: PHP_5_1) > /php-src/ext/spl spl_directory.c > Log: > Only use win32 directory separators on win32 or netware. c:\home\php\php-5.1\ext\spl\spl_directory.c(1409): error C206

[PHP-DEV] Re: Problem with streams on Windows (current PHP_5_1)

2006-02-02 Thread Sara Golemon
Run-Time Check Failure #3: The variable 'bindport' is being used without being defined. Indeed, when the socket/bindto option isn't set, that gets used uninitialized. I'll apply a fix. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/u

[PHP-DEV] Re: freeing memory usage and apache sapi

2006-02-02 Thread Michael Wallner
Moshe Doron wrote: May some of you, will find more interest on the the bellow ticket and the bug will get his proper treatment (you may explain me why i'm idiot and the bug is bogus, but please explain yourself). [1] http://bugs.php.net/bug.php?id=36197 You seem to hang yourself on the fac

[PHP-DEV] freeing memory usage and apache sapi

2006-02-02 Thread Moshe Doron
I know that my english is not 'production level' one, but the following misunderstood all over the bug[1] evolution is may result of low interest of the good people that wokring hard to close the open bugs. May some of you, will find more interest on the the bellow ticket and the bug will get

[PHP-DEV] CVS Account Request: tkxs

2006-02-02 Thread Kalle Sommer Nielsen
Helping the danish translation of the PHP Manual, and custom extensions. Currently it is rather slow and often badly translated. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php