News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Twenty-four things you can do to make SMF go faster (Updated June 16th, 2010)

Started by Vekseid, February 16, 2009, 06:29:50 AM

Previous topic - Next topic

Arantor

It's not.

What it's doing is saying is that if it isn't an attachment, load the theme, otherwise just load the browsers (which is part of the attachment download requirements)

Though I thought you still had to load browser type anyway for most themes?

Joshua Dickerson

Woops, that makes a lot more sense. Yeah, you need to add detectbrowser() somewhere
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Something like that

Quote from: groundup on September 11, 2009, 12:46:16 PM
I wonder why it is using so much CPU on a bunch of simple strpos calls.

SMF? It's likely the parse_bbc function. Each strpos call is small, but when you do 10,000 of them, it's a lot.

Arantor

I thought groundup was referring to the strpos calls in detectBrowser().

Joshua Dickerson

I was wondering more about the detecting of the browser but then Arantor made me realize I wasn't reading it correctly.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Something like that

Yeah, the detect browser function is pretty lightweight.

Loading the theme isn't. It parses the language files and does a bunch of other crap that have no use when sending out a thumbnail. That's where the savings comes in.

Cal O'Shaw

Any chance this can get packed up for people like me who can do a little php but aren't ready to risk a site by hacking away with a blunt cleaver?

We don't allow uploads of attachments or avatars, so I don't know if this will help us, but we've done most of the other steps here and have cut CPU much lower (only over on some days) but memory remains over every day.

Grazie

Something like that

Quote from: Cal O'Shaw on September 11, 2009, 04:44:56 PM
Any chance this can get packed up for people like me who can do a little php but aren't ready to risk a site by hacking away with a blunt cleaver?

We don't allow uploads of attachments or avatars, so I don't know if this will help us, but we've done most of the other steps here and have cut CPU much lower (only over on some days) but memory remains over every day.

Grazie

It won't help you then.

Arantor

The problem with packing it up as a mod is simple: not every step can be carried out by every site admin, due to host configuration or some other restriction. Nor is every step appropriate for every site admin, so unfortunately it has to be done as a serious of complex steps *sigh*

Plus if you do it by hand you will learn a little something about the process.

Cal O'Shaw

I was doubtful, but figured it didn't hurt to ask.

I have learned a lot already from you folks and really appreciate it.

Grazie!

Something like that

Quote from: Arantor on September 11, 2009, 04:47:53 PM
The problem with packing it up as a mod is simple: not every step can be carried out by every site admin, due to host configuration or some other restriction. Nor is every step appropriate for every site admin, so unfortunately it has to be done as a serious of complex steps *sigh*

Plus if you do it by hand you will learn a little something about the process.

This could easily be packaged as a mod, but:
1) it might break other things, like TinyPortal (apparently)
2) it wasn't thoroughly tested.

Arantor

I misread the question; I was thinking of all of the 22 things in this thread, not this one tweak.

Joshua Dickerson

Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Arantor

A lot of users use TP and expect things not to break, especially when you'll have to manually uninstall it when it does break - because I've noticed that users won't generally read the mod pages for little things like "OH NOES DONT USE THIS MOD WITH [A.N.OTHER MOD]" even if it's in big letters.

Something like that

Quote from: groundup on September 11, 2009, 05:16:51 PM
So what if it breaks another mod? The mod is for SMF, not TP :P

It's one thing to make it so another mod doesn't apply. It's another to change core functionality inside SMF. A patch could easily be written that doesn't change the functionality, but I didn't need it. Another reason why I didn't release a mod -- my solution is only half baked.

Owdy

Question, if i try to convert tables to InnoDB, get rid of text tables etc, is it safe to go back if that doesnt work? Another thing, that doesnt make upgrades etc harder in future? And if that faster, why it isnt default?

edit: i really wanna try that in my site http://hoitajat.net . 213181 messages, 9889 topics, 3953 members.
innodb_buffer_pool_size is  134217728, so its enough? Its 128M, right?


http://hoitajat.net/status.php
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

Yes, that's enough.

Getting rid of tinytext will only make your forum faster. There's no other issues with it. You could convert it back, but I have no idea why you'd want to.

Converting to InnoDB is reversible.

Neither will make upgrades harder.

TinyTexts are gone in 2.0. Not all systems support InnoDB, so SMF goes with MyISAM by default. And MyISAM is usually faster for small, unbusy boards.

Also, make sure you have innodb_flush_log_at_trx_commit=0 set in my.cnf for best InnoDB performance. And if it's a linux box, set innodb_flush_method=O_DIRECT.

Owdy

Quote from: Mark Rose on September 27, 2009, 01:16:14 PM
TinyTexts are gone in 2.0.
Well, im using it :)


QuoteAlso, make sure you have innodb_flush_log_at_trx_commit=0 set in my.cnf for best InnoDB performance. And if it's a linux box, set innodb_flush_method=O_DIRECT.
Hmmm, I dont have acces to that file, im in shared host.
Details
http://hoitajat.net/status.php

innodb_flush_method
innodb_flush_log_at_trx_commit:  1

Well, its "1". Is it wise to convert?
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Arantor

Tinytext is gone from RC2 onwards, and it's possible to convert to it readily enough.

Something like that

Quote from: Owdy on September 27, 2009, 01:27:59 PM
Quote from: Mark Rose on September 27, 2009, 01:16:14 PM
TinyTexts are gone in 2.0.
Well, im using it :)

Well, they'll be gone in RC2 then :)

QuoteHmmm, I dont have acces to that file, im in shared host.
Details
http://hoitajat.net/status.php

innodb_flush_method
innodb_flush_log_at_trx_commit:  1

Well, its "1". Is it wise to convert?

Yes, I would still convert, but I wouldn't convert all your tables, just the suggested ones. You'll get a benefit still: some page loads will be slower, but you shouldn't get dramatic slowdowns that can happen with MyISAM.

Advertisement: