Unread Post Count

Unread Post Count 1.2.0

No permission to download

Thanks for the info :)

There definitely seems to be a mixed experience.

I think even some busy boards are able to run this without much issue.

Some issues were reported here, but resolved after a small config change:

Thanks Chris, I'll see if that helps. If not I'll hang on for now and hopefully install it again in the future if you get a chance to introduce caching.
 
For some reason my MySql Query was taking a long time. I disabled it for now. I seemed to slow down my forum for a while. Does this mean anything to you?

Code:
SELECT COUNT(*)
            FROM xf_post AS post
            INNER JOIN xf_thread AS thread ON
                (post.thread_id = thread.thread_id AND thread.node_id IN (12, 16, 93, 92, 138, 142, 97, 105, 104, 101, 98, 95, 112, 103, 99, 123, 94, 96, 132, 28, 107, 124, 63, 61, 52, 53, 17, 108, 72, 106, 109, 33, 137, 139, 122, 10, 11, 9, 135))
            INNER JOIN xf_forum AS forum ON
                (forum.node_id = thread.node_id AND forum.find_new = 1)
            LEFT JOIN xf_thread_read AS thread_read ON
                (thread_read.thread_id = thread.thread_id AND thread_read.user_id = '2860')
            LEFT JOIN xf_forum_read AS forum_read ON
                (forum_read.node_id = thread.node_id AND forum_read.user_id = '2860')
            WHERE post.post_date > '1409232170'
            AND post.message_state = 'visible'
            AND post.post_date > GREATEST(
                IF (thread_read.thread_read_date IS NULL, 0, thread_read.thread_read_date),
                IF (forum_read.forum_read_date IS NULL, 0, forum_read.forum_read_date)
            )
 
For some reason my MySql Query was taking a long time. I disabled it for now. I seemed to slow down my forum for a while. Does this mean anything to you?

Code:
SELECT COUNT(*)
            FROM xf_post AS post
            INNER JOIN xf_thread AS thread ON
                (post.thread_id = thread.thread_id AND thread.node_id IN (12, 16, 93, 92, 138, 142, 97, 105, 104, 101, 98, 95, 112, 103, 99, 123, 94, 96, 132, 28, 107, 124, 63, 61, 52, 53, 17, 108, 72, 106, 109, 33, 137, 139, 122, 10, 11, 9, 135))
            INNER JOIN xf_forum AS forum ON
                (forum.node_id = thread.node_id AND forum.find_new = 1)
            LEFT JOIN xf_thread_read AS thread_read ON
                (thread_read.thread_id = thread.thread_id AND thread_read.user_id = '2860')
            LEFT JOIN xf_forum_read AS forum_read ON
                (forum_read.node_id = thread.node_id AND forum_read.user_id = '2860')
            WHERE post.post_date > '1409232170'
            AND post.message_state = 'visible'
            AND post.post_date > GREATEST(
                IF (thread_read.thread_read_date IS NULL, 0, thread_read.thread_read_date),
                IF (forum_read.forum_read_date IS NULL, 0, forum_read.forum_read_date)
            )
This was the problem I (and a few others) had. The details are on the previous page of the thread.
 
Chris D updated Unread Post Count with a new update entry:

Bug fixes and new caching feature

First of all, thank you to everyone for their patience. I know I promised this a while ago but I have only recently had time to finish this off. Specifically I would like to thank @Azhria Lilu, @The Sandman, @MattW and @Martok for giving this some testing.

The most important feature of this release is the new caching feature. This should drastically improve the number of hits your database gets as the Unread Post Count is now cached for 1 minute by default in the visitor's session. Should you wish to increase the cache time, you can find the setting in Admin CP > Options > Threads, Discussions and Conversations:

View attachment 86215

There is a chance that this could still perform poorly on extremely busy boards or databases that aren't optimised. Changing the cache time up will help, but ultimately each of your logged in members will still be running quite a heavy query every X minutes.

Finally, the annoying bug which counted unread posts in deleted threads has been resolved.

Read the rest of this update entry...
 
i am trying to upgrade this and i get

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, xxx and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
 
You would have to consult your host or check your servers logs to see what's happening there.
 
I had an unable to SQLI DROP a table error when upgrading, but uninstalled the previous version and then installed this and went fine.
 
@Chris D I just tested this and I noticed I got unread post counts on posts in threads I don't have permission to show. Can this be avoided somehow?
 
Permissions are fully checked so that shouldn't be possible. What version are you running?
 
Unfortunately I'm still having problems with this add-on. It's better than before the update but after a while MySql CPU usage increases considerably so I've had to disable it. This isn't a moan at Chris as the add-on is excellent and it seems to be running well for lots on here but I thought it was worth mentioning in case anyone else has problems.
 
Top Bottom