The _html5_tools_link_field_process() function in html5_tools.module is declared inside an if(module_exists('link')) check. Presumably the intent there is to not declare the function, and therefore burn memory, unless the link module is present for it to be used.

However, the PHP engine doesn't work that way. The function is complied no matter what, period, with an internal hash name. That hash name is only linked to a real user space name (_html5_tools_link_field_process in this case) if the condition passes. That is, this technique has no performance benefit whatsoever and may actually be a slight performance decrease. The function should just be declared outright without a conditional. There is no way around that.

Comments

ericduran’s picture

Status: Active » Fixed

This "if" is indeed pointless especially since the process isn't added unless the module exists. So its pretty much pointless.

This is now fixed.

Thanks.
--
http://drupalcode.org/project/html5_tools.git/commit/db822025b69b2d7985b...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.