[html-formfu] [patch] Change eval tests to use ref for big speed up in _Group.pm

Carl Franks fireartist at gmail.com
Thu Dec 3 09:49:32 GMT 2009

2009/12/2 Steve Nolte <steve at redanvil.net>:
> I noticed a big slow down when dealing with group-type fields that have a lot of options.  Tracked it down to the H::FF::E::_Group _parse_option() which was using eval's for testing if the item was a hash or array reference.  Switched it to just test with ref() and got a major speed up, about 1.5 to 2 seconds for some forms.

Hi Steve,

I've gone through the entire HTML-FormFu source, changing all similar
uses of eval().
I went with Ronald's sugestion of Scalar::Util::reftype() - but thanks
for the initial patch!


More information about the HTML-FormFu mailing list