[RT] Online Status Ribbon

[RT] Online Status Ribbon 1.3.7

No permission to download
Is there a conditional I can put into the message template to add a class to each post depending if the user is online. Such as... the deleted class:

Code:
{xen:if $message.isDeleted, 'deleted'}


Ideally something like this:

Code:
{xen:if $userStatus.userOnline, 'online'}

It sends the actual online status of the user to the template...so you can either key off of the value, or you'd have to modify it to use a true/false check.
 
The issue I reported above was resolved by @mistypants.

Anyway, is it possible to have these hook into other places? Namely:
  • Personal conversations
  • Member profiles
  • Member cards

Conversations are tricky. The database query for posts is built up in the model...and this mod tapped into that query builder to inject an additional join. The query for conversations doesn't go through the same builder logic, so it couldn't get tapped into. I never looked into profiles or cards.
 
That's interesting, how do you actually measure that please?
I had to recreate my production environoment in a test environment, then started hammering that with Siege so that the CPU was running at around 90%. I then switched on/off each of the plugins and observed the effect on CPU via top.

When I switched off Online Status, the CPU suddenly dropped from around 90% to around 40%.

While the improvement on my site has been profound since switching it off, it is worth noting that there are a couple of things about the way my site is setup that make it pretty unique, which may mean that this plugin would not be problematic for 99% of sites out there. I'll probably hack away at it at some point to work out why it was performing as it was. We were using the previous version quite happily on XF1.1
 
I had to recreate my production environoment in a test environment, then started hammering that with Siege so that the CPU was running at around 90%. I then switched on/off each of the plugins and observed the effect on CPU via top.

When I switched off Online Status, the CPU suddenly dropped from around 90% to around 40%.
That would likely be a major issue for my busy big board. Its unfortunate that performance issues popup with so many addons. Do you run litespeed cache?
 
That would likely be a major issue for my busy big board. Its unfortunate that performance issues popup with so many addons. Do you run litespeed cache?
I run a dedicated memcache server, things like litespeed cache dont really help much for my particular setup
 
the performance problem seems to be in Asp/plugin.php

$tempParams = $template->getParams();
$params += $tempParams;
$params['userStatus'] = $userStatus;
self::_getOnlineStatusTemplate()->setParams($params);


This is beeing called in a loop, it nearly doubles the CPU usage of Xenforo when rendering a thread page.

Funny thing is, it is NOT the query (outer join on session) which kills the performance, it's this "params" hocus pocus...

If anyone has a solution to this, I'd be glad to hear it ...
 
Top Bottom