Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 May 2005 at 19:44 UTC
Updated:
20 Jan 2016 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
morbus iffPatch attached.
Comment #2
Steven commentedWhy can't this code use pager_query() and query the database directly? If free tagging vocabularies can get so big, it seems a very inefficient thing to fetch the entire list.
Comment #3
Steven commentedNote: if you need to fetch a list of tags ordered by hierarchy in one query, you should look at how comment.module does it.
Comment #4
morbus iffWhich part of comment.module? I hope you don't think the crazy "thread 1.1.2/, 1.2" stuff is better.
Comment #5
Steven commentedMaybe it's crazy, but it has a single, pagable query and an unambigous sorting both ways. It works well for what it needs to do.
In fact, the only problem is the assignment of numbers because we cannot do a "natural order" sort in SQL. Right now it uses a rather inefficient coding that scales O(n) with size and adds another digit every 10 values.
This prompted me to experiment with better codings. First I generalized the current scheme a bit, then tweaked it to get near O(log n) scaling and on average only 20-30% more digits than an equivalent decimal notation, while still retaining the string sorting property. Quite fun actually.
I don't see the problem with the approach though... all it does is store a compact ordering key per row. Compare this to the convoluted tree logic in taxonomy_get_tree() and I know which one I prefer.
Of course, I'm not at all sure if the comment.module approach can be implemented here, but I can't believe you'd do something like this after talking about mega-taxonomies for so long. Loading in 8000 tags just to show 50 is nowhere near optimal.
Comment #6
morbus iffFair enough. I don't have the time right now to code this though - my deadline for the full NHPR conversion is fast approaching, and the patch attached merely brings us back to the "working" behavior prior to the pager changes, not "better" behavior, which you're proposing. However, I'm a little .. .. .. cautious about the idea of using a comment.thread-like equivalent (something I immediately knee-jerked disliked the first time I saw it) for a regular parent/child relationship just to get a hierarchal sort based on a LIMIT. This can't be how other database apps are doing it, is it?
Comment #7
dries commentedMorbus: the funky comment thread stuff rocks. We should do the same for book pages and taxonomy terms if it can be done effectively. This doens't mean we should remove the traditional pid-columns.
Comment #8
moshe weitzman commentedneeds work according to people who matter.
Comment #9
Jaza commentedMoving to 6.x-dev queue.
Comment #10
meba commented#292073: Long hierarchies not displayed on Taxonomy admin page is a duplicate, but it's having some patch:
Comment #11
Alice Heaton commentedHi bug fixers :)
I'm not entirely sure that #292073 should have been made a duplicate of this issue, as it's for a very specific problem ; it details what the symptoms are and how to re-create it. Instead this issue here seems to be an open-ended "things are broken" issue.
Anyway, just in case people are interested, here is the symptoms/how to recreate comment that go with #292073 (ie. the patch posted in #10)
Symptoms :
I have a very long vocabulary with hierarchies (for regions/countries). When displaying in the admin page (admin/content/taxonomy/xxx) only the first page shows any items - subsequent pages (eg. admin/content/taxonomy/xxx?page=2) show no items (even though there should be some).
Supposition :
I have looked at the code, and from what I can tell this will happen if :
That's it :) You can view the full report (+some comment about how the patch works) on http://drupal.org/node/292073
Comment #12
dpearcefl commentedDoes this issue exist in current D6?
Comment #13
dpearcefl commentedComment #14
aspilicious commentedStill an issue?
Comment #15
ytsurkthis is still happening .. yes.
there is a helper module, (waaay more performant)
which actually could be integrated into core .. ??
see here too #292073: Long hierarchies not displayed on Taxonomy admin page
Comment #16
dawehnerThe taxonomy page is a view now, which works.