• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

The Alert System

Roach

Active member
#1
I am interested to know how the alert system pulls the data from replies to threads I have replied to.

The reason why I want to know is because I am highly interested in Xenforo but have no idea how the alert system works and as my friend pointed out whilst trying to do an alert system for another software, the only way he could see to do it would create a lot of queries and therefore use a lot of disk space. So how do you go about doing this, does it create a lot of queries? Because I would not want it to use up all my disk space because of the alert system.
 

Chris D

XenForo developer
Staff member
#2
Disk space will not be an issue.

As far as I can tell, alerts automatically expire after a certain amount of time and once the alerts have been viewed they are removed from the database.
 

euantor

Well-known member
#3
I too am interested in how it works as the only way I've ever been able to think of doing it is hardly optimal (especially the notification of replies to threads you've posted in). I can't quite tell if the alerts are instant either though as on some forums they seem delayed.
 

Chris D

XenForo developer
Staff member
#4
They are instant. But you will only see them appear if you reload the page or an AJAX operation occurs on the page such as posting a reply or loading an overlay such as the member card.

It depends what you'd class as hardly optimal.

They work great on every single XenForo forum I use.
 

euantor

Well-known member
#5
That would explain it I guess. I'm mostly just wondering about what the average query count per page is. I like to know stuff like that before thinking about choosing a piece of software so that I know how long my hosting will be able to handle the load before I need to up my resources.
 

Slavik

XenForo moderator
Staff member
#6
That would explain it I guess. I'm mostly just wondering about what the average query count per page is. I like to know stuff like that before thinking about choosing a piece of software so that I know how long my hosting will be able to handle the load before I need to up my resources.
It won't give you any issues.
 

euantor

Well-known member
#7
Fair enough. I'm likely going to be buying a license within the next month or two no matter what anyway. As soon as my car passes it's MOT I'll know.
 

Onimua

Well-known member
#8
That would explain it I guess. I'm mostly just wondering about what the average query count per page is. I like to know stuff like that before thinking about choosing a piece of software so that I know how long my hosting will be able to handle the load before I need to up my resources.
In general, XenForo's queries average about 10 per page, usually varying depending on cron jobs and other things but it's very light otherwise.
 

euantor

Well-known member
#9
That's pretty darn impressive I must say. Does that include thread listings? I usually use MyBB and it averages 9 on index and close to 20 when viewing a thread.
 

euantor

Well-known member
#11
That's definitely quite surprising. When I was using vB I seem to remember a similar query count to MyBB's too so I thought that was about average.
 
#12
well... if you install add-ons that uses MySQL queries, then the number will definitely increase... For my site:
index: 20 queries (took .13 seconds)
forum view: 17 queries (took .12 seconds)
thread view: 27 queries (took .27 seconds)
and I have 35 add-ons installed...