[Chameleon-dev] [Bug 109] [Chameleon] Code Review - WidgetManager.php
Fri, 14 Nov 2003 11:03:48 -0500

------- Additional Comments From  2003-11-14 11:03 -------
> eval is not a performance hit (AFAI can tell)

Ok, but I had made test (5 line script) before I got your comment. Here's the
Eval can takes something like 3 times the normal time to execute simple calls,
but since we only do 50-60 class declaration call we probably only loss 1 millisec.

On a loop of 50 element that declare a "ttt" class each time, it takes 2
millisec  instead of 1 to do it with an eval() call.

I also found that instead of:

$szEval = "\$oWidget =& new $szClass();";

you can do:

$oWidget =& new $szClass;

It will declare a class with the name in $szClass

I don't know if it worth the change in the WigetManager.php file, but I feel
that it's good to know for everyone. Maybe Paul can make the change to see which
impact it has on his test when he profile it.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

This archive was generated by Pipermail.