In category_get_children() the second db_query appears to be missing a %d placeholder
for $cid.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | category.inc_3.patch | 1015 bytes | bdragon |
In category_get_children() the second db_query appears to be missing a %d placeholder
for $cid.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | category.inc_3.patch | 1015 bytes | bdragon |
Comments
Comment #1
bdragon commentedOrigin of line in question:
http://drupal.org/cvs?commit=32569
I agree. This looks to me like it would cause serious memory bloat and possibly bugs.
Here's a patch.
Comment #2
Jaza commentedThe commit in question was a big overall change to the caching strategy used by the category module. It was a very rushed affair, and its rapid development was sponsored by Robert Douglass, who at the time needed some performance improvements and needed them fast. Since then, I have realised that the changes introduced by this commit actually worsened the performance of the category module, but I haven't had time to re-evaluate the problem and to develop a better solution.
category_get_children() is just one of many functions that were affected by this change, and as such, it is just one of many that will need to be fixed. I will be looking at this problem in more detail when I get a chance.
Comment #3
marcoBauli commentedplease have a look also at the main Memory and Performances issue at http://drupal.org/node/82554
maybe this can be setted as duplicate?
ty
Comment #4
Jaza commentedThanks for pointing out that other issue thread, Marco - I must have missed it. Marking this thread as duplicate of http://drupal.org/node/82554
Comment #5
jvandervort commentedPatch note: After applying this patch, category view only shows one level of children.
ie, doesn't recurse to the level specified in the container.
Comment #6
deavidsedice commentedYes, this patch will corrupt "function category_get_children". And does not solve any caching problem.
I've written one patch to Category.inc on http://drupal.org/node/82554 ,and I feel that it will work better than this one.
If someone finds a bug using my patch, please, report it.