Summary | Optimized Tags |
Queue | Ansel |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | duck (at) obala (dot) net |
Created | 06/26/2008 (6218 days ago) |
Due | |
Updated | 12/14/2008 (6047 days ago) |
Assigned | 12/14/2008 (6047 days ago) |
Resolved | 12/14/2008 (6047 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
Tagger code.
State ⇒ Assigned
it up to Michael. A lot of different options are now available from
the Rampage Tagger code in the incubator, including stat tables that
take care of caching counts for tags and tags + users (and this adds
user_id to the current Ansel structure, allowing folksonomy-type stuff
which Ansel doesn't currently have).
On HAVING vs. the JOIN - HAVING might be quicker in some cases but
using a JOIN also lets us exclude tags from the result set, and it
also avoids some filesorting most of the time. So the rampage tagger
goes with the JOIN solution.
to start comparing it with the queries that we had...any feed back on
performance is welcome. I'm going to port these changes over to my
production server data and see what it gets us.
http://cvs.horde.org/diff.php/ansel/lib/Tags.php?r1=1.87&r2=1.88&ty=u
State ⇒ Feedback
You only updating the tags that are passed to Ansel_Tags::writeTags()
this function *always* overwrites the resources's tags, so your not
capturing when the tag is removed.
2) Was there any special reason you removed the charset conversion is
some of the queries?
3) the variable $id is not always set, that is why I was using the
$reults['tag_id'] value - any special reason you didn't want to use
that?
New Attachment: Tags.diff
performance enhancement though, once the gallery vs image tag count
issue is resolved.
images and galleries table. To be more simple, I reduced the amount of
changes just to introduce the tag_count column and avoid the double
UNION SELECT. Other performance patches will come after this will be
commited.
http://blogs.sun.com/dups/entry/having_a_follow_up
State ⇒ Assigned
http://blogs.sun.com/dups/entry/having_a_grand_old_time
Going to try to refactor Ansel's tag code to see what this gets us,
what other issues it might bring up etc....
Milestone ⇒
enhancement though, once the gallery vs image tag count issue is
resolved.
tag count. Is used only as a flag if the gallery/image has tags or
not to save later queries. So this can be a boolean value.
and then your using the value of that field directly in
Ansel_Tags::readTags() and Ansel_Tags::listTagInfo(). With your
changes, once any tags are added/removed from an image or gallery, the
tag counts will never be correct because the value in the
ansel_tags.tag_count field is only taking into account the number of
times that tag is used in _either_ the images table *or* the galleries
table, when it needs to be both.
overwritten with the count of tags in *either* the ansel_images_tags
or ansel_galleries_tags table...when it should be both.
tag count. Is used only as a flag if the gallery/image has tags or not
to save later queries. So this can be a boolean value.
overwritten with the count of tags in *either* the ansel_images_tags
or ansel_galleries_tags table...when it should be both.
is a bit, well, boring and wasteful considering that the "Browse"
page can be configured with a cloud of whatever size the user wants.
State ⇒ Assigned
is a bit, well, boring and wasteful considering that the "Browse" page
can be configured with a cloud of whatever size the user wants. I
suppose I can be convinced differently if there is a compelling reason
that I am missing or the Cloud page contained some other widgets/info
etc...
iteration/concatenation in gallery.php instead of using implode()?
Is there a big performance difference?
even the tag count
iteration/concatenation in gallery.php instead of using implode()?
Is there a big performance difference?
New Attachment: cloud.php
Priority ⇒ 1. Low
State ⇒ New
New Attachment: ansel-tags.diff
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ Optimized Tags
Type ⇒ Enhancement
with the kind of table that tags are implemented with. Is taking
seconds for my installations with a lot of images. As the server must
read all table data to perform the counting and proper selection of
data. So we must help the server and perform the count on the rare
update operations to have fast common selections.
The patch:
reorganize the Ansel_Tags object store the store counts of used tags
in the tags table to not count on the fly
mark galleries and images if they have tags or not so we can avoid not
needed queries with all galleries and images that does not have tags.
Add limit functionality to the tags cloud block