Hi,to pick this up once again: Did anybody do any benchmarks on this? I'm just trying to get some very rough numbers - 40000 setParameter calls with virtual path and not elements go from 0.22 seconds to 1.20 seconds. While this looks like a massive performance hit, does anybody have a clue how often setParameter()/setParameters() is called on a ParameterHolder in a typical szenario? Rough numbers would be sufficient. If we have 1000 calls on a standard dispatch, we loose 25 milliseconds by doing it the right way, if we have 10000 calls, we loose 250ms which seems far worse. I'd really like to see some number here so we can at least make an educated guess.
By the way - judging from the code I'd say that the AgaviArrayPathDefintion actually accepts malformed input.
cheers felix On Dec 11, 2008, at 7:49 PM, David Zülke wrote:
The problem is that it starts to get really ambiguous when you do $ph->setParameters(array( 'foo[bar]' => 'baz' )); if we had to dissect *all* of those (and we would have to, recursively!) then that would imply a massive performance impact. So, if we changed this, setParameters() would remain "old-style", and that's just as bad if you ask me (and probably the reason why setParameter() doesn't work this way. Thoughts, everyone? - David Am 11.12.2008 um 16:33 schrieb Benjamin Börngen-Schmidt:I would agree with Felix, even though I never used the possibility of setting an array as parameter (cuz I didn't know it'll and i didn't need it yet), but when looking at the code I would expect the same as Felix.Why would I want to have the Parameters Name containing brackets? If Inot want to access my value i saved there? Cheers Benjamin Am 11.12.2008 um 16:09 schrieb David Zülke:Nah, that's intentional. The idea is that you can set a literal "foo[bar]" if you need to (and that will be returned if you get it again instead of the entry "bar" in "foo"). Changing that would break BC; I believe; we're relying on it in a couple of places, I think. - David Am 11.12.2008 um 14:47 schrieb Felix Gilcher:Hey, while writing the tests for #955 I stumbled over the behavior demonstrated in this snippet: $p = new AgaviParameterHolder(); $p->setParameter('foo', array('bar' => 'baz', 'ball' => 'round')); $p->getParameter('foo[bar]'); // baz $p->setParameter('foo[bar]', 'foo'); $p->getParameter('foo'); // hmm: array('bar' => 'baz', 'ball' => 'round'), expected: array('bar' => 'foo', 'ball' => 'round') $p->getParameter('foo[bar]'); // foo $p->unsetParameter('foo[bar]'); // foo $p->getParameter('foo[bar]'); // baz !!! (instead of null)This is triggered by AgaviParameterHolder::setParameter() not trying to resolve array parts in the name like get/has/unsetParameter() do.I'd call that unexpected and I'd say it's a bug - it took me nearly 15 minutes to figure out what I was doing wrong in my testcase. However it's a bit unclear how to fix that... Any insights? cheers felix -- Felix Gilcher Bitextender GmbH Paul-Heyse-Str. 6 D-80336 München T: +49 89 57 08 15 16 F: +49 89 57 08 15 17 M: +49 172 840 88 28 [email protected] http://bitextender.com/ Amtsgericht München, HRB 174280 Geschäftsführer: David Zülke, Florian Clever _______________________________________________ Agavi Dev Mailing List [email protected] http://lists.agavi.org/mailman/listinfo/dev_______________________________________________ Agavi Dev Mailing List [email protected] http://lists.agavi.org/mailman/listinfo/dev_______________________________________________ Agavi Dev Mailing List [email protected] http://lists.agavi.org/mailman/listinfo/dev_______________________________________________ Agavi Dev Mailing List [email protected] http://lists.agavi.org/mailman/listinfo/dev
-- Felix Gilcher Bitextender GmbH Paul-Heyse-Str. 6 D-80336 München T: +49 89 57 08 15 16 F: +49 89 57 08 15 17 M: +49 172 840 88 28 [email protected] http://bitextender.com/ Amtsgericht München, HRB 174280 Geschäftsführer: David Zülke, Florian Clever
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Agavi Dev Mailing List [email protected] http://lists.agavi.org/mailman/listinfo/dev
