MrFish Posted March 20, 2010 Share Posted March 20, 2010 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 More sharing options...
boen_robot Posted March 20, 2010 Share Posted March 20, 2010 The SMF system? Solaris' SMF? What SMF are you talking about? Some links please? Link to comment Share on other sites More sharing options...
redwall_hp Posted March 20, 2010 Share Posted March 20, 2010 The forum software, I would assume: http://simplemachines.org/ Link to comment Share on other sites More sharing options...
MrFish Posted March 20, 2010 Author Share Posted March 20, 2010 I mean Simple Machines Forum. Link to comment Share on other sites More sharing options...
boen_robot Posted March 20, 2010 Share Posted March 20, 2010 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 More sharing options...
MrFish Posted March 20, 2010 Author Share Posted March 20, 2010 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 More sharing options...
boen_robot Posted March 20, 2010 Share Posted March 20, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.