Jump to content

How SMF Works?


MrFish

Recommended Posts

If anyone is familiar with smf's context arrays could someone explain to me how it works? I know it improves performance exponentially and I would like to use a similar model.

Link to comment
Share on other sites

OK, and where did you saw those "context arrays" you're talking about? It still sounds too vague. Some samples? Documentations links? Are those confuguration options, hacks... what?

Link to comment
Share on other sites

Well, I was in the middle of building a custom forum and I thought I was getting better speed because it was custom built by me to do what I want it to do without checking all the possibilities that a public forum would offer. Because other forums are open to hundreds of options I imagined it would take longer to check through them.So I downloaded and installed smf that was "built for performance" to compare. Loading 1 post of 1 topic of 1 forum took longer on my forum in its most basic stages then it took to load index with a dozen sections, checking all recent posts and such. I was doing a lot less but taking a lot longer to do it. After some research I found it smf used arrays to load data which made it much faster. I'm trying to figure out what there process was to do that. Like--Is there a global array everyone uses or a set of arrays relavent to a user.-When a new topic is posted does it update the database AND update arrays? (This sounds like it would get messy and confusing).-If it uses a global array (like I mentioned), how do all users share it. Is that where the GLOBAL constant comes into play?Just some general questions. I'm trying to get an idea of what it looks like and I can do more research from there. I tried to read the php files and was a bit confused.

Link to comment
Share on other sites

It's possible that SMF creates databse views, and then queries just them, and actually selects only the minimum amount of data required. Those two things alone can significantly increase the performance of an application.Also, SMF may be using output buffering (i.e. calling ob_flush() and flush() after most echoes), in order to print out stuff as it comes along. This gives you the impression it loads faster, even though it actually loads slightly slower if you make a stopwatch test.Whatever the case, "context arrays" don't appear to be playing a role I think... that would be too memory consuming.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...