Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
28 Jun 2009 at 01:03 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
webchickWe dug a bit deeper in IRC about this, and it turns out this only occurs the first time the page is loaded that a new module is in there it doesn't know about yet.
As best we can tell, this happens because http://api.drupal.org/api/function/system_get_files_database/7 is querying the database, and there's no record of the module there yet.
So while sun's patch will mask the issue, it seems like there might be something deeper...
Comment #2
sunNot RTBC.
http://api.drupal.org/api/function/system_get_files_database/7 is invoked to apply further properties to each module, but the registry does not know of new modules at this stage. So file_scan_directory() returns modules the registry doesn't know of yet.
Tagging.
Comment #3
sunWe want to invoke system_get_module_data() here (once) to scan and update the available modules. Needs testing of the installer though.
Comment #4
damien tournoud commented... but we also want to add a static of some sort to system_get_module_data() in order not to traverse the whole file tree twice in search of modules.
Comment #5
berdir@4
Actually, we do it 3 times already :) (twice with system_get_module_data() and the registry does it directly to save update queries that we don't execute anymore).
I tried to implement the static cache in #147000-30: Rewrite module_rebuild_cache() and system_theme_data() already, but failed because simpletest had issues with that and I didn't wanted to delay that issue.
Comment #7
berdirI changed the registry_rebuild() function in #429132: Remove unecessary module_rebuild_cache() call from _registry_rebuild(), now that we optimized system_get_module_data() (And will hopefully further improve it), we can revert that, I think. Not that you can also remove the ini file parsing stuff then.
Comment #8
berdirAdding a static cache and getting the tests working seems to be hard, so I just reverted my patch in _registry_rebuild() for now.
Comment #9
berdirThat was the wrong patch...
Comment #10
berdirAnd now the correct status...
Comment #11
boombatower commentedLooks clean and fixes issue.
Comment #12
webchickI like the resulting code much better. I think according to Berdir in #7 that the performance hit isn't as great anymore, but I'm sure catch will inform us if that's not the case. ;)
Committed to HEAD!