Re: [PHP-DEV] ignored patches

2007-12-06 Thread Pierre
On Dec 6, 2007 12:05 PM, Gergely Hodicska <[EMAIL PROTECTED]> wrote: > Hi! > > > > Yes, that's my point - 3X faster include opcode is not 3X faster code. > > Of course if you do this opcode a lot of times, it would be somewhat > > slower than if you do this opcode just one time. However, the questi

Re: [PHP-DEV] ignored patches

2007-12-06 Thread Gergely Hodicska
Hi! Yes, that's my point - 3X faster include opcode is not 3X faster code. Of course if you do this opcode a lot of times, it would be somewhat slower than if you do this opcode just one time. However, the question is how it would influence the whole application? I didn't say that the code wi

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Gregory Beaver <[EMAIL PROTECTED]>: > > Martin, > > Please stop spreading misinformation. [snip] > At least get your facts straight before posting. > > Greg > Greg, that was uncalled for. Isn't it a fact that the namespace keyword does more than just declare a namespace in your cu

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Stanislav Malyshev
DO they do any work besides being included? No, I put the codes in the files inside an if (0), I wanted to test only the include. Yes, that's my point - 3X faster include opcode is not 3X faster code. Of course if you do this opcode a lot of times, it would be somewhat slower than if you do t

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gregory Beaver
Martin Alterisio wrote: > 2007/12/4, Chuck Hagenbuch <[EMAIL PROTECTED]>: >> Quoting Martin Alterisio <[EMAIL PROTECTED]>: >> >>> Knowing that I'll have to strongly encourage the developers to dump that >>> patch. The namespace declaration shouldn't do more than what it's >> expected >>> to do. Why

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Hodicska Gergely
>> I used the following test code: > > What do these included file do? Is it part of some real-life > application? >From my previous mail: "The files come from a real life project.", the site has almost 80 million hit per day. > DO they do any work besides being included? No, I put the codes in th

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Chuck Hagenbuch <[EMAIL PROTECTED]>: > > Quoting Martin Alterisio <[EMAIL PROTECTED]>: > > > Knowing that I'll have to strongly encourage the developers to dump that > > patch. The namespace declaration shouldn't do more than what it's > expected > > to do. Why this: > > > > namespace ya

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Michael McGlothlin
I'm a firm believer that it's better to throw more CPU power at a performance problem than to make code less maintainable. Just buy a faster server. That hardly applies to library developers, though. They don't have control over their users' CPU power... You should write the best good you can

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Steph Fox
I'm a firm believer that it's better to throw more CPU power at a performance problem than to make code less maintainable. Just buy a faster server. That hardly applies to library developers, though. They don't have control over their users' CPU power... - Steph -- PHP Internals - PHP Run

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Chuck Hagenbuch
Quoting Martin Alterisio <[EMAIL PROTECTED]>: Knowing that I'll have to strongly encourage the developers to dump that patch. The namespace declaration shouldn't do more than what it's expected to do. Why this: namespace yadayada; import yadayada; Should work different that: import yadayada;

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Michael McGlothlin <[EMAIL PROTECTED]>: > > > > Actually, it's an expected tradeoff of interpreted languages. > > Compilable languages have both a compiler and a linker that bundles > > everything in one executable. By using bytecode caching and bundling > > you're just getting closer to

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Michael McGlothlin
Actually, it's an expected tradeoff of interpreted languages. Compilable languages have both a compiler and a linker that bundles everything in one executable. By using bytecode caching and bundling you're just getting closer to the performance expectations of a compilable language. But bundl

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Gregory Beaver <[EMAIL PROTECTED]>: > > Martin Alterisio wrote: > > It's also not possible to reliably bundle files even if you could have > > multiple namespaces declarations as, correct me if I'm wrong, import > > statements affect the whole file, there is no way to "unimport", a > > n

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gregory Beaver
Martin Alterisio wrote: > It's also not possible to reliably bundle files even if you could have > multiple namespaces declarations as, correct me if I'm wrong, import > statements affect the whole file, there is no way to "unimport", a > name clash could still occur. OK, I'll correct you: you're

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Steph Fox
I strongly suspect performance difference in bundles does not follow from syscalls. On include() PHP does a lot more than just issue a couple of syscalls. So Michael's right and it needs some proper investigation. - Steph -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] htt

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Stanislav Malyshev
The need to pack a program all into a single source file for performance reasons would seem to indicate that the way PHP compiles/interprets could be improved. Wouldn't it be better to improve this area than add language features to deal with the issue? How do you improve the performance of a

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Steph Fox
That depends on how many 'bundle files' are allowed. I hate to say it, but if this were an INI directive rather than a keyword it would be possible to limit bundling to a single file, or to any given number. Take that back, it wouldn't work... I was thinking of single applications rather than

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Michael McGlothlin <[EMAIL PROTECTED]>: > > The need to pack a program all into a single source file for performance > reasons would seem to indicate that the way PHP compiles/interprets > could be improved. Wouldn't it be better to improve this area than add > language features to deal

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Steph Fox
The need to pack a program all into a single source file for performance reasons would seem to indicate that the way PHP compiles/interprets could be improved. Wouldn't it be better to improve this area than add language features to deal with the issue? How do you improve the performance of a

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Steph Fox
Couldn't there be some way to mark a 'bundle' file and use that mark to discriminate between where multiple namespaces are or are not allowed in zend_compile.c? That would eliminate the potential for abuse, no? Not really. People would start "bundling" files left and right, just because somebo

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Michael McGlothlin
The need to pack a program all into a single source file for performance reasons would seem to indicate that the way PHP compiles/interprets could be improved. Wouldn't it be better to improve this area than add language features to deal with the issue? -- Michael McGlothlin Southwest Plumbing

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Gregory Beaver <[EMAIL PROTECTED]>: > > Martin Alterisio wrote: > > 2007/12/4, Gregory Beaver <[EMAIL PROTECTED] > > >: > > > > Martin Alterisio wrote: > > > 1) Why is performance relevant to whether namespaces are > > implemented one per > > > f

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Stanislav Malyshev
Couldn't there be some way to mark a 'bundle' file and use that mark to discriminate between where multiple namespaces are or are not allowed in zend_compile.c? That would eliminate the potential for abuse, no? Not really. People would start "bundling" files left and right, just because somebo

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Steph Fox
Hi all, It has nothing to do with "little peon". Be fair Stas, Brian already apologized for the way that post came across. You argue that we need some language-level change to improve performance (and it is the only reason to add it). It is suspected that this language change has very high

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Stanislav Malyshev
You are putting forward some hypothetical results. I want to know, for No I am not. the benefit of the discussion, if you can prove the 5% figure you've advanced. There's nothing to prove - I want to see the measure of improvement bundling provides on real-life applications. So far I have s

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Stanislav Malyshev
no APC, with APC, and with APC and apc.stat=0. The benchmark in question compared require_once to include with full paths to a single file. In the best case, I got a 12% performance difference between include with full paths and apc.stat=0 and a single file. 12% sounds more realistic than 45%,

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Nicolas Bérard-Nault
You are putting forward some hypothetical results. I want to know, for the benefit of the discussion, if you can prove the 5% figure you've advanced. On Dec 4, 2007 12:36 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > your head). Can you please be more responsible and provide some real > >

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Stanislav Malyshev
your head). Can you please be more responsible and provide some real results ? Results of what? -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Roman Borschel
On Dec 4, 2007, at 6:00 PM, Martin Alterisio wrote: 2) I was under the impression namespaces were introduced to improve code maintainability. Was I wrong? You are right. On the flip side, if you can't use your maintainable code because it is slow as molasses, that is a problem. If that's

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Roman Borschel
Yes, thanks i already changed that. Doesnt make a big difference though. Roman On Dec 4, 2007, at 6:10 PM, Gergely Hodicska wrote: vserver. And the xdebug profiling result shows me in fact that this additional time seems to be spend in the autoload facility and its require_once calls. OFF:

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gregory Beaver
Martin Alterisio wrote: > 2007/12/4, Gregory Beaver <[EMAIL PROTECTED] > >: > > Martin Alterisio wrote: > > 1) Why is performance relevant to whether namespaces are > implemented one per > > file or many per file? > > Because there is a performance diff

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gregory Beaver
Martin Alterisio wrote: > I didn't understand. Do you mean that I was wrong? Or that I was right about > namespaces purpose, but that's only needed in development? Therefore, > shouldn't the bundling process remove the need for namespaces (i.e. the > bundling process removes namespaces)? You can't

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Roman Borschel
On Dec 4, 2007, at 5:50 PM, Martin Alterisio wrote: 2007/12/4, Roman Borschel <[EMAIL PROTECTED]>: On Dec 4, 2007, at 5:09 PM, Martin Alterisio wrote: 1) Why is performance relevant to whether namespaces are implemented one per file or many per file? Because including/requiring 80 files one

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gergely Hodicska
vserver. And the xdebug profiling result shows me in fact that this additional time seems to be spend in the autoload facility and its require_once calls. OFF: require_once in autoload is not logical to me. Best Regards, Felhő -- PHP Internals - PHP Runtime Development Mailing List To unsubsc

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Gregory Beaver <[EMAIL PROTECTED]>: > > Martin Alterisio wrote: > > 1) Why is performance relevant to whether namespaces are implemented one > per > > file or many per file? > > Because there is a performance difference between code in separate files > and the same code in a single file.

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
2007/12/4, Roman Borschel <[EMAIL PROTECTED]>: > > On Dec 4, 2007, at 5:09 PM, Martin Alterisio wrote: > > 1) Why is performance relevant to whether namespaces are implemented > > one per > > file or many per file? > > Because including/requiring 80 files one by one seems to be > significantly slow

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gregory Beaver
Martin Alterisio wrote: > Sorry to step in uninvited to this discussion, I have some doubts about all > this, and I'll really appreciate if someone more knowledgeable could > enlighten my ignorance. The doubts I have are as follows: > > 1) Why is performance relevant to whether namespaces are impl

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Roman Borschel
On Dec 4, 2007, at 5:14 PM, Gregory Beaver wrote: On the other hand, combining multiple files into a single file results in line numbers no longer corresponding to the original line numbers of the file, adding another translation step when debugging a problem. Of course, this is just simpl

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gregory Beaver
Roman Borschel wrote: > A small addition: > > the exact same test results in the following average times on my dev > machine: > with bundled classes: ~0.07s (~2-10 includes) > without: ~0.10s (~60-80 includes) > > Thats ~30ms difference in average. I wanted to post that because the > results on

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Gregory Beaver
Brian Shire wrote: > Hi Greg, > > I'm sorry that my message probably did come off as condescending. :-( > I really just wanted to share some my *own* pitfalls in case it was > something that might be helpful here. > > If you aren't too put off and you are running APC then perhaps we can > discu

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Martin Alterisio
Sorry to step in uninvited to this discussion, I have some doubts about all this, and I'll really appreciate if someone more knowledgeable could enlighten my ignorance. The doubts I have are as follows: 1) Why is performance relevant to whether namespaces are implemented one per file or many per f

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Roman Borschel
A small addition: the exact same test results in the following average times on my dev machine: with bundled classes: ~0.07s (~2-10 includes) without: ~0.10s (~60-80 includes) Thats ~30ms difference in average. I wanted to post that because the results on my dev machine are much more const

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Roman Borschel
Hi everyone, i just want to throw in my 2 cents. I've experimented alot with file bundling in the past on several projects and i can confirm that is does have a positive affect in applications that include/require a lot of files during a request (at least thats how it looks like!). Yes my

Re: [PHP-DEV] ignored patches

2007-12-04 Thread Derick Rethans
On Mon, 3 Dec 2007, Brian Shire wrote: > On Dec 3, 2007, at 2:17 PM, Stanislav Malyshev wrote: > > > > I am a developer on a CMS also which uses the auto-include > > > functionality to include many classes over many files. Each > > > request can include up to 30 different files. The speed incr

Re: [PHP-DEV] ignored patches

2007-12-03 Thread Brian Shire
On Dec 3, 2007, at 9:16 PM, Gregory Beaver wrote: Brian Shire wrote: On Dec 3, 2007, at 2:17 PM, Stanislav Malyshev wrote: I am a developer on a CMS also which uses the auto-include functionality to include many classes over many files. Each request can include up to 30 different files.

Re: [PHP-DEV] ignored patches

2007-12-03 Thread Gregory Beaver
Brian Shire wrote: > > On Dec 3, 2007, at 2:17 PM, Stanislav Malyshev wrote: > >>> I am a developer on a CMS also which uses the auto-include >>> functionality to >>> include many classes over many files. Each request can include up to 30 >>> different files. The speed increase is around the 15%

Re: [PHP-DEV] ignored patches

2007-12-03 Thread Gergely Hodicska
Hi! Can you provide some benchmark setups that this could be researched - i.e. describe what was benchmarked and how to reproduce it? I have already played with this topic. If you don't have an opcode cache lazy loading is a good solution: it is worth loading a code only when it is needed. Bu

Re: [PHP-DEV] ignored patches

2007-12-03 Thread Brian Shire
On Dec 3, 2007, at 2:17 PM, Stanislav Malyshev wrote: I am a developer on a CMS also which uses the auto-include functionality to include many classes over many files. Each request can include up to 30 different files. The speed increase is around the 15% mark when combining the files.

Re: [PHP-DEV] ignored patches

2007-12-03 Thread Nicolas Bérard-Nault
Hi Stats, Everybody is providing clear and proven results. You are the only one who is throwing around hypothetical numbers (that 5% figure comes out of your head). Can you please be more responsible and provide some real results ? Also, pretty much every feature of a language can be abused. From

Re: [PHP-DEV] ignored patches

2007-12-03 Thread Stanislav Malyshev
I am a developer on a CMS also which uses the auto-include functionality to include many classes over many files. Each request can include up to 30 different files. The speed increase is around the 15% mark when combining the files. This is with APC installed too. Can you provide some benchmar

Re: [PHP-DEV] ignored patches

2007-12-03 Thread Stanislav Malyshev
Remember, we both found, independently, that combining separate files yields from a 10-30% performance increase. I have only talked to 2 On synthetic benchmarks. On real apps, which do databases, calculations, network, etc. that would be probably no more than 5%, probably even less. And I don

RE: [PHP-DEV] ignored patches

2007-12-03 Thread scott.mcnaught
reason. SCOTT MCNAUGHT Software Developer Synergy 8 / +617 3397 5212 [EMAIL PROTECTED] -Original Message- From: Gregory Beaver [mailto:[EMAIL PROTECTED] Sent: Monday, 3 December 2007 5:30 PM To: Stanislav Malyshev Cc: internals Mailing List Subject: Re: [PHP-DEV] ignored patches

Re: [PHP-DEV] ignored patches

2007-12-02 Thread Gregory Beaver
Stanislav Malyshev wrote: > As for multiple namespaces per file, it adds certain complications, both > syntax-wise and engine-wise, so I'm still not 100% convinced it is worth > it. Which are? Remember, we both found, independently, that combining separate files yields from a 10-30% performance i

Re: [PHP-DEV] ignored patches

2007-11-07 Thread Stanislav Malyshev
The patch to implement multiple namespaces per file, and the patch to remove keyword restrictions for methods appear to have fallen through the cracks. I would like to encourage at the minimum a review, and About the second - I'm not sure which patch it is, I remember there was a simple one an