By Peter on Tuesday, 07 January 2014
Posted in General Issues
Replies 12
Likes 0
Views 0.9K
Votes 0
I've just migrated Komento from 1.0 to 1.7 on Joomla 2.5.
The process was very straightforward and thankfully the db migration was completely automated.
I've only needed to update a single template override which is pretty cool!

I just wanted to thank your for all the hard work and this great piece of code!

Also thank you for adding these two options:


Maximum Reply Level
Thread Indentation


That's sorted some issues on mobile devices we've had at redsharknews.com
Also thanks for reducing number of Ajax requests.

Thanks, Once again! You've got another subscription from us.
Peter
Hello Peter,

Thank you so much for the kind compliments
·
Tuesday, 07 January 2014 02:49
·
0 Likes
·
0 Votes
·
0 Comments
·
There's, however, still some room for optimizations.
On an K2 article's page Komento adds approximately 30 database queries with our config, which is many, but still acceptable.

If you look at our frontage, each of the list-blocks are modules of type "K2 Content" which don't show comments or even their counts.
Komento is still making database queries on these. On that particular homepage it adds 250 queries, which is 25 queries per one module.



To reproduce this, add a few modules of type "K2 Content" and enable K2 integration in Komento.

I appreciate that Komento may want to count number of comments for each article to show it, but this should be skipped if "Comments counter and anchor link" in the module's params is OFF.
Would you be able to consider optimizing this or let me know and I'll send you what part of the code should fix this?
·
Tuesday, 07 January 2014 06:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Peter,

Thanks for the heads up on this, we'll try to update this in the next version of Komento
·
Tuesday, 07 January 2014 12:29
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm sorry for the getting things confusing. I'd thought I've set

- Enable K2 plugins
- Enable Joomla! plugins

to off in these module's settings, but they were off causing unnecessary processing by Komento content plugin.

Feel free to add us to Komento's showcase.
Thanks
·
Tuesday, 07 January 2014 19:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Do you mean then turning off that 2 options will prevent Komento from processing?
·
Tuesday, 07 January 2014 23:24
·
0 Likes
·
0 Votes
·
0 Comments
·
All the K2 modules are no longer calling onK2CommentsCounter() event when these options are off, thus skipping the queries. That's indeed sorted my issue.

----

I've also found another issue similar to this on K2 Item List View, when used with Komento.
But that looks like an issue with K2 itself. See my PR https://github.com/joomlaworks/k2/pull/106 for more details

It's obvious that leaks like this can kill most webservers.

Many thanks,
Jason
·
Tuesday, 07 January 2014 23:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Ah I see. Great work!!
·
Wednesday, 08 January 2014 10:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Another Idea I've just had when using Komento with caching.
Currently when a new comment is added (or approved by admin) entire joomla cache is being cleaned out which might be a wast of resources in some situations.

Do you think it would be possible to add an option to the config so that when a comment is added/approved it would only clear cache for the page it's related to like single Joomla or K2 article?
I haven't looked into the code for that so it might be not possible at all. Just wanted to know what your thoughts are on this.
·
Tuesday, 14 January 2014 19:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Peter,

When Komento loads the cache library in Joomla, it actually clears the cache of com_komento only. It doesn't affect anything else.
·
Tuesday, 14 January 2014 21:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Don't you think it would make sense to also clear the 'page' cache if a system cache plugin is on? Ideally only for the page with the comment being approved.
Otherwise the 'page' cache must naturally expire or be manually erased for the comment to appear on the site.
·
Friday, 17 January 2014 00:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok, please forget about my previous question. Do you guys consider having like "stackideas" plugin group with events like:

- onKomentoCommentAdded()
- onKomentoCommentUpdated()
- onKomentoCommentApproved()

etc...
·
Friday, 17 January 2014 01:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Peter,

Perhaps in the future, we'll consider adding such events but as of right now, we don't have such triggers yet.
·
Saturday, 18 January 2014 14:11
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post