Used to observe the impact of Drupal modules on performance. The number of modules directly affects the number of hook function searches, and the function search speed affects performance. This article mainly shares with you the PHP function search performance test, hoping to help everyone.
Pay attention to the impact of the number of modules on overall performance, hooks are only one of them:
"; } } $end_time=microtime(TRUE); echo "$start_time
$end_time
time:
"; echo $end_time - $start_time;
Test results:
Load 10,000 randomly named functions and find 10,000 The time consumption of a random function name is less than 2 milliseconds, and the impact is minimal. It can be considered that drupal's hook search does not affect performance
Test machine configuration:
cpu: Intel i5-7200U
Memory: 8G
system: win10
The above is the detailed content of Search performance test of php function. For more information, please follow other related articles on the PHP Chinese website!