Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
6 Feb 2007 at 15:44 UTC
Updated:
21 Aug 2018 at 03:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Chris Johnson commentedSeems like a straight-forward and rational optimization to me.
Comment #2
dries commentedWe need to fix this, but I want to figure out the cleanest approach. The proposed patch is simple but awkward. It points out a flaw in the API of module_list(). We need weird code to work around the behavior of module_list(). The proper solution is to fix module_list, IMO.
Why shoudn't we be able to call module_list(FALSE, TRUE) instead of module_list(TRUE, TRUE)? When $refresh = FALSE, it should use lazy-initialization to load the list of modules when these haven't been loaded yet. The second time, it should notice that the list is already present, and return the list as is.
Can you look into this some more Earnie?
Comment #3
Anonymous (not verified) commentedThis changes somewhere between 4.7.3 and HEAD
It used to be:
I'll look further into module_list.
Comment #4
Anonymous (not verified) commentedModule_list is used for three different functions:
The refresh is used to reset the static $list with appropriate values. I'm of the opinion that we need three different functions; module_list, module_bootstrap_list and module_fixed_list. The static $list for module_list and module_bootstrap_list would only need to be refreshed if status changes for a module. There would be no static $list for the module_fixed_list.
Comment #5
Anonymous (not verified) commentedAs I hack at module_list I'm finding other interesting issues. It'll be a little while before I get back to you on this. I'm approaching the module_list patch such that no API changes are made but individual helper functions are created. Later...
Comment #6
Anonymous (not verified) commentedI've created http://drupal.org/node/116820 to track the module_list change. Once that patch is accepted I will review the use of module_list to determine if the refresh argument is being used optimally.
Comment #7
Anonymous (not verified) commentedAssuming the patch http://drupal.org/node/116820#comment-195585 is committed then all we need to do for bootstrap_invoke_all is change the refresh parameter from TRUE to FALSE.
Comment #8
Anonymous (not verified) commentedThe patch is contained in the all encompassing patch at http://drupal.org/node/116820#comment-205539.