6 seconds is extreme.
I'm seeing 2.3 here and I think that's way too long.
I do understand the need to have something that makes a good first impression. This is why I waited so bloody long to release something, but even this I know is not nearly good enough. So there's this balance between getting something to be "right enough" and getting something out there. It took a lot for me to let this alpha quality release escape. A project of this size and complexity may simply be too much for one person to build effectively.
As far as the performance problems go, they are not due to server configuration. The performance problems are, however, solvable, at least for the small site case. What I've done is to create an XML based intermediate language I call FVML, a.k.a. the formVista markup language. It's a super-set of HTML that has some control structures and other features that allows me to encapsulate complicate functionality including Javascript features into single tags. For instance, the Like links you see are literally <like> tags in FVML. The same is true for all the dialogs.
This is /great/ for prototyping as I can experiment with layouts and functionality easily and quickly. In the early stages of a project, it allows me to figure out what works and what doesn't without incurring a huge development cost. In the early days, I also thought it might be a good way for getting relatively low cost HTML designers into programming. (I mean, seriously, what other system out there can let designers field dialogs, like buttons, tagging systems, etc without knowing programming?)
Frankly, it's the reason I've been able to get all this work done. However, it comes at a serious runtime cost. In previous builds, I wasn't doing nearly as much work as I am in this latest release. I've finally run into the performance wall that I always knew FVML would have.
I have a few options. The one I've been planning on for quite some time is to create an FVML to PHP compiler. Basically, to take the XML based FVML source files and turn them into straight PHP which can then be cached (instead of, as is the case now, interpreting the XML files at run time incurring the huge cost that represents.)
The other option is to rewrite the main forum components by hand.
There are a number of other optimizations I can make which will each provide incremental gains.
Ideally I would like to keep the flexibility of FVML while increasing the performance.
The other area that is causing a huge amount of overhead is the "social index" manager. This is the core part of the system that implements that tagging, embedding, mentioning, etc. There's this concept of "privacy" that I"ve built but largely turned off. If you attempt to view a thread, the system will determine whether or not you are allowed to based on the privacy setting. Most object in the system have a privacy setting of "inherit" which means the privacy manager will ask the object containing the object in question. In the case of a forum post (each and every one), it'll ask the containing thread, which is also at a privacy setting of "inherit" which causes it to ask the containing forum which then finally passes the buck up to the group. So there are four requests per object just to detemine whether or not you're allowed to see it. Now I do some caching, but it's clearly not fast enough.
I may scrap the privacy manager in it's entirety or more likely drastically simplify it.
The rest of the performance issues have to do with the general nature of PHP. For that, my plan is to eventually move over to the JIT (just in time) PHP compiler virtual machine Facebook has released called HipHopVM. This platform should result in a 3X to 5X performance improvement but represents some work.
And I should point out the server the software is currently running on is 2004 vintage.