XF 2.3 Boosting performance in XenForo 2.3

googlechrome.github.io_lighthouse_viewer_ (4).png
In today's 'Have you seen...?' entry for XenForo 2.3 we're going to look at how we've zeroed in on enhancing performance, ensuring your community has a swift and seamless experience. We're going to take a deep dive into the advancements we've made and how they stack up against various performance metrics.

But, before we get into the individual changes, let's take a quick look at the baseline - this is our current Performance score as calculated by Lighthouse for the XenForo Community forum list:

googlechrome.github.io_lighthouse_viewer_.png

Here's the performance scores for some other forum software:

1.png
2.png
3.png

It's crucial to note that while this score provides a performance benchmark, it isn't the only indicator of success. Indeed, results can fluctuate slightly with multiple test runs. A site can still enjoy popularity with a lower score, but a higher rating undeniably enhances both search engine rankings and overall user experience.

Stay tuned! We'll reveal XenForo 2.3's updated score shortly. But before that, let's dive into the changes that have brought us here, shall we?

If you would like to jump to a particular section, use the links below.
Alternatively, if you want to skip a whole lot of reading, check out the TL;DR below:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

Oh and if you're concerned that all we've got to show you in XenForo 2.3 is performance improvements - fear not.

We will be showcasing a brand new feature next week!
 
That wasn’t meant as an example, rather that I just miss $.css()
I do miss $.css. Working with el.style and window.getComputedStyle separately is a bit of a pain, though on a practical level I have somewhat grown to dislike some of the helpers in jQuery which essentially conflate two separate things. The behaviour of $.data can be particularly annoying being that it deals with both dataset and essentially an arbitrary storage mechanism.

Lost count of how many times moving to JS style versus $.css tripped me up too being that, if I’m recalling correctly, jQuery didn’t require you to pass in units for things like width.
 
HTML:
{{ link ('direct-messages', $conversation) }}
Are conversations being rebranded?
Eh, might as well just say yes. But that’s all it is. “Conversations” has always been a somewhat confusing moniker. It was chosen, admittedly before the popularity of “direct messages” being used on other services/platforms. I think the original idea was they wanted to avoid “private messages” as it’s a bit of a misnomer given they aren’t necessarily private - you can invite others, you can have an admin who reads them via an add-on, they can be seen by moderators (partially) if messages are reported and so on.

Direct message takes less explaining.

Nothing in the code has changed at this point apart from phrases and routes.
 
I sometimes wonder how I persevered with it. I was working on it solidly for about 8 weeks and I only cried once.

It’s @Jeremy P who I feel sorry for. He had to code review and fix all my bugs 🤣
Is there any reason to not use addEventListener() rather than wait until we have XF.on() (for cases where I don’t need to remove event listeners)?
 
Is there any reason to not use addEventListener() rather than wait until we have XF.on() (for cases where I don’t need to remove event listeners)?
No reason at all. Unless you need namespaced events. There’s a new XF.trigger() method too as a wrapper around dispatchEvent which is also fine to use. The inability to remove event listeners without a reference to the original handler is the biggest pain that on/off helps with, but often not too difficult to just keep that reference anyway.
 
View attachment 291644In today's 'Have you seen...?' entry for XenForo 2.3 we're going to look at how we've zeroed in on enhancing performance, ensuring your community has a swift and seamless experience. We're going to take a deep dive into the advancements we've made and how they stack up against various performance metrics.

But, before we get into the individual changes, let's take a quick look at the baseline - this is our current Performance score as calculated by Lighthouse for the XenForo Community forum list:

Here's the performance scores for some other forum software:

It's crucial to note that while this score provides a performance benchmark, it isn't the only indicator of success. Indeed, results can fluctuate slightly with multiple test runs. A site can still enjoy popularity with a lower score, but a higher rating undeniably enhances both search engine rankings and overall user experience.

Stay tuned! We'll reveal XenForo 2.3's updated score shortly. But before that, let's dive into the changes that have brought us here, shall we?

If you would like to jump to a particular section, use the links below.
Alternatively, if you want to skip a whole lot of reading, check out the TL;DR below:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

Oh and if you're concerned that all we've got to show you in XenForo 2.3 is performance improvements - fear not.

We will be showcasing a brand new feature next week!
The part of this video where @Kier is talking about performance of CSS and we are just looking at Cloudflare’s cache header for the CSS requests being DYNAMIC because xenforo.com isn’t having Cloudflare edge cache them…

Cant Speak Nathan Fillion GIF
 
Which part of it is news?

We never support more than one active version. The only exception to that is of course security releases and the exceptional case of supporting 1.5 for an extended period after 2.0 was released.

We have always recommended add-on developers do the same, branching new functionality off into a new version, while leaving the last stable version as-is for people who need legacy support.

Of course you can do what works best for you, but that’s our recommendation.
 
I understand that you’ve not supported older versions, but now is seems according to your statement that worrying about backwards compatibility isn’t acceptable. So it leaves us remaining third party developers to make a choice.
 
I understand that you’ve not supported older versions, but now is seems according to your statement that worrying about backwards compatibility isn’t acceptable. So it leaves us remaining third party developers to make a choice.
My position hasn’t changed. I do not believe that developers should spend time supporting two different code bases for what should be a dininishingly small number of users. It’s not worth your time that could be better spent writing new code for a supported version.

But the choice is still ultimately up to you. We’re just not necessarily going to be implementing additional checks and code to cater for it.
 
@Chris D are their any plans on including html compression too ?

Basically something like this, that this add-on is performing: https://xenforo.com/community/resources/nobita-minify-html.4541/

I'd agree with this. I wrote an add-on on a previous XF version that would remove all blank lines and turn multiple spaces/returns into a single space. I had it coded to do it on template build so it was saved in the actual template php files so that there was no performance hits on each page load to do it. It saved quite a few Kb per page.

Now that I think about it, it might've been @Chris D who talked me out of re-writing and/or using it.
 
Top Bottom