Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.x-dev
Component:
Database schema
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
26 Aug 2010 at 02:05 UTC
Updated:
23 Nov 2010 at 10:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
andrewsuth commentedHaving looked into this a little further, it seems the function
_nodewords_get_pages_datais only ever called more than once when the pageadmin/content/nodewords/meta-tags/otheris displayed.I think it would be better to optimise the query for the most common scenario and perhaps have an exception (when loading
../meta-tags/other) to load the whole table.From what I can tell, you only need a query like this for every page load:
About caching the query..
I see it alot in Drupal modules, where developers query the database on every page load. Wouldn't it be more efficient to make the query call once and store it in a global variable, rather than a static one? That way, all subsequent page loads can save on an additional database call?
Comment #2
dave reidAgreed that this needs an index and a more explicit query. Also discovered that the Custom pages overview form is saving non 0/1 values for 'enabled' so it requires an update to fix.
Comment #3
dave reidComment #4
dave reidTested this manually with the upgrade and this helps trim performance on every page. Committed to CVS!
http://drupal.org/cvs?commit=444228
Comment #5
andrewsuth commentedThanks and nice work!