… and a preliminary solution:
The WordPress plugin “Ajax Edit Comments” from The Reader Appreciation Project1 allows the commenter to edit his comment for a certain time – useful especially for typos and minor corrections. (Admins can do more.) Visitors utilize it here for about every 10th comment, by the way.
Now Pierre notified me yesterday about the high number of database queries (and that the response time could be better, too) – higher than what I always saw when logged in. (See the blue footer line.) Doing a little research, I found that it’s the aforementioned Ajax Edit Comments that uses 4 additional database queries for each comment in order to check if the visitor is allowed to edit it (unles (s)he’s logged in as admin who is always allowed to edit). That can sum up to quite a lot if there are many comments on a single post.
I quickly added a little modification to the plugin2 which check the comment age in advance without database access – in my quick tests, these modifications appear to work fine. If you too don’t see any problems – feel free to test it here or maybe later for the music quiz on 16:00 – I will, of course, send the changes to the plugin’s author, hoping they will be included in future versions.
Pierre Markuse1 2008-11-18 at 15:49 170 Comments
quote
Hey, da hast Du ja schnell ne Lösung gefunden. Leider habe ich heute zum Musik-Quiz wieder keine Zeit
Sebastian2 2008-11-18 at 16:01 786 Comments
quote
sexy Symbolfoto
herrlich
cimddwc3 2008-11-18 at 17:37 6351 Comments
quote
Würde mich mal interessieren, was die weiblichen Leser dazu sagen.
Pierre, tja, schade mit dem Quiz – und jetzt ist es auch schon wieder vorbei…
Michael4 2008-11-21 at 19:23 253 Comments
quote
Hola die Waldfee, ich dachte mir gerade warum das bei mir nicht so ist, dabei war ich ja als Admin eingeloggt… 442 Queries bei 96 Kommentaren. Gute Nacht.
cimddwc5 2008-11-21 at 19:54 6351 Comments
quote
Solang’s der Server aushält…
Sofern der Plugin-Autor keine Nebenwirkungen meiner Änderungen findet (so wahnsinnig übersichtlich ist der Code nicht), dürfte er sie ja bald einbauen – andernfalls (bzw. auch jetzt schon) kann ich ja selber meine Version zur Verfügung stellen.
Michael6 2008-11-21 at 20:02 253 Comments
quote
Och, jetzt liefs schon so lange, jetzt kann ich auch auf das offizielle Update warten! Aber lobend erwähnen werd ich, wenns soweit ist.
Michael7 2008-12-07 at 19:23 253 Comments
quote
Hat dir der Autor verraten, wann er das Update plant?
cimddwc8 2008-12-07 at 19:59 6351 Comments
quote
Er hatte nur (kurz nach meiner Mail) gesagt, er würde sich drum kümmern – mehr/genaueres hab ich seitdem nicht von ihm gehört.
Michael9 2009-01-19 at 14:42 253 Comments
quote
Stell doch mal deine Version zur Verfügung, das dauert mir beim Autor zu lange.
cimddwc 2009-01-19 at 14:57 6351 Comments
quote
Bitteschön: http://cimddwc.net/stuff/waec-ag.zip
Enthält Ersatz-PHP-Dateien für 1.1.5.1 und 2.2.6.0, meine Änderungen sind mit “--ag” markiert.
Michael10 2009-01-19 at 14:57 253 Comments
quote
Danke!
Michael11 2009-01-19 at 15:02 253 Comments
quote
Fein, von 500 auf 60 Queries nenne ich mal einen signifikanten Abstieg.
Michael12 2009-03-10 at 16:57 253 Comments
quote
Gerade hab ich auf die neuste Version aktualisiert und dein Patch wurde immer noch nicht integriert!
cimddwc 2009-03-10 at 17:19 6351 Comments
quote
Könnte damit zu tun haben, dass sich nichts weiter getan hat… war wohl ein schlechter Zeitpunkt für meinen Änderungsvorschlag.
Michael 2009-03-10 at 17:25 253 Comments
quote
Es wird Zeit, das ich mir auch Changelogs durchlese.
Michael 2009-03-22 at 18:58 253 Comments
quote
So, nun ist der neue Autor darauf aufmerksam gemacht worden.
Michael 2009-03-23 at 9:10 253 Comments
quote
In der neusten Version ist dein Patch nun integriert!
cimddwc 2009-03-23 at 9:41 6351 Comments
quote
Schön – muss ich mir gleich mal anschauen.
Michael 2009-03-23 at 12:03 253 Comments
quote
Man muss nur ein klein wenig provokant sein, dann bekommt man Aufmerksamkeit.
Michael 2009-03-24 at 7:59 253 Comments
quote
Die beiden haben noch ein “stilles” Update gemacht, hat bei mir noch mal ein paar Queries gebracht:
http://ajaydsouza.com/wordpress/plugins/wp-ajax-edit-comments/comment-page-1/#comment-5446