Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jul 2011 at 15:08 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
adamfranco commentedI'm attaching a patch with resolves this issue.
Comment #2
adamfranco commentedI have done some load-testing with this patch on a site that has 1,194 rows in nodewords_custom and 114,293 rows in the nodewords table and the throughput on my site has jumped from an average of 9.7 requests/second to 21.2 requests/second.
Comment #3
damienmckennaI think this should be included in the next release.
Comment #4
damienmckennaComment #6
damienmckennaThe current _nodewords_get_custom_pages_data() function includes static caching already, making this redundant. Thank you for the effort, though!
Comment #8
adamfranco commentedHi Damien,
This issue still exists and is not solved by the static caching. The problem is very severe when a site has many entries in the
nodewords_customtable. Even with the caching changes, aSELECT * FROM nodewords WHERE type = 10 AND id = ?query gets run for every entry in nodewords_custom. Our site has about 2000 entries in nodewords_custom and this results in an extra [unnecessary] 2000 queries on every page load, enough to take down our database host._nodewords_detect_type_and_id()doesn't need all of the metadata for every custom path, just the paths and ids, and this patch allows_nodewords_detect_type_and_id()to access just the data it needs in a single query.I have recreated the patch against the 6.x-1.x HEAD (and hopefully formatted it correctly with git-format-patch).
Best,
Adam
Comment #9
damienmckennaYou've convinced me. Committed, it'll be in the next release.