Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: aldo on July 01, 2009, 01:08:43 AM

Title: Avatar Optimization
Post by: aldo on July 01, 2009, 01:08:43 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1924)

What does it do? (The following statistics are from SMF 2.0!)
This modification improves the speed and efficiency of avatar loading on your SMF 2.0 powered forum. By default SMF loads some unnecessary bits and pieces not required to load avatars. So I have created a setup to only load the bare basics which reduces queries by at the least 2 and a maximum of 5.

The great thing is no theme or URL edits are required, the only edit is to the index.php file, so even if your forum is totally decked out, this modification should install with ease :D

If you are going to use this modification on SMF 2.0, download avataroptimizationv1-for2.zip.

UPDATE: I have ported this modification to work with SMF 1.1.9. From my testings (Sorry, I don't have APC/Memcache/eAccelerator or any of those so I couldn't use caching) it doesn't yield as great of results as SMF 2.0 does, but it uses ~0.03 seconds faster, and without caching 4 queries, though with caching I would suspect it would use 1-2.

If you want to install this modification on SMF 1.1.9, download avataroptimizationv1-for1.zip
Title: Re: Avatar Optimization
Post by: Cal O'Shaw on July 01, 2009, 02:59:39 AM
We're running in a critical situation, where our ISP says we're using way too much CPU on the shared server (5% instead of our allocated 0.5%) and ANYTHING that can cut the load our 1.1.9 forum pulls is welcome.

And I've been reading that optimisation topic as well...

Grazie!

Cal
Title: Re: Avatar Optimization
Post by: aldo on July 01, 2009, 03:03:09 AM
Good, please tell me if this modification helps with your situation :) I would love to see if it really does help on sites like yours.
Title: Re: Avatar Optimization
Post by: Antechinus on July 01, 2009, 03:12:41 AM
Where are the download files?
Title: Re: Avatar Optimization
Post by: aldo on July 01, 2009, 03:40:45 AM
No text was in the link to the modification... Fixed. ;) Sorry about that.
Title: Re: Avatar Optimization
Post by: Nibogo on July 01, 2009, 09:43:04 AM
Great mod thanks :)
Title: Re: Avatar Optimization
Post by: aED on July 02, 2009, 06:58:57 AM
Any one who already used this mod does it really make it faster a little bit?

What if I moved the avatars out of the attachments directory will it still work?
Title: Re: Avatar Optimization
Post by: Sudhakar Arjunan on July 02, 2009, 04:12:00 PM
Quote from: aED on July 02, 2009, 06:58:57 AM
Any one who already used this mod does it really make it faster a little bit?

What if I moved the avatars out of the attachments directory will it still work?

I have to install in my big forum.

anyone update about the status.
Title: Re: Avatar Optimization
Post by: aldo on July 02, 2009, 04:48:58 PM
Quote from: aED on July 02, 2009, 06:58:57 AM
Any one who already used this mod does it really make it faster a little bit?

What if I moved the avatars out of the attachments directory will it still work?
I looked at your forum, the way you serve your avatars won't work with this. But yours is just as good if possibly not better than the way this modification does it.
Title: Re: Avatar Optimization
Post by: aED on July 02, 2009, 07:40:23 PM
Quote from: aldo on July 02, 2009, 04:48:58 PM
Quote from: aED on July 02, 2009, 06:58:57 AM
Any one who already used this mod does it really make it faster a little bit?

What if I moved the avatars out of the attachments directory will it still work?
I looked at your forum, the way you serve your avatars won't work with this. But yours is just as good if possibly not better than the way this modification does it.

Hello, Thanks anyway for the mod
Title: Re: Avatar Optimization
Post by: [Core] on July 02, 2009, 09:26:50 PM
Great Mod!
Title: Re: Avatar Optimization
Post by: Sirius OCTeam on July 16, 2009, 02:58:41 PM
Hello,

great mod  ;)

But sometimes my error log, showing up:
PHP Notice:  Undefined index:  mime_type in /www/forum/Sources/DisplayAvatar.php on line 141
Title: Re: Avatar Optimization
Post by: Sirius OCTeam on July 18, 2009, 09:48:20 AM
Perhaps this could be ok ?

if (isset($file['mime_type']))
{
header('Content-Type: '. $file['mime_type']);
}
Title: Re: Avatar Optimization
Post by: aldo on July 20, 2009, 06:54:37 PM
Yeah, thanks :) I will add that soon. I forgot I had a couple mods I need to update for 1.1.10 and SMF 2.0 RC1.2. I will get to that tonight.
Title: Re: Avatar Optimization
Post by: jak6868 on August 11, 2009, 04:34:51 PM
Quote from: aldo on July 20, 2009, 06:54:37 PM
Yeah, thanks :) I will add that soon. I forgot I had a couple mods I need to update for 1.1.10 and SMF 2.0 RC1.2. I will get to that tonight.
hi - do you have 1.1.10 yet?  thanks...
Title: Re: Avatar Optimization
Post by: C4G-TK on August 12, 2009, 03:17:01 PM
Are you going to change the package, so that it works in RC1.2?  It appears that the same code that is edited appears in the newest version, too. 
Title: Re: Avatar Optimization
Post by: PlutoDelic on September 14, 2009, 01:09:17 PM
Quote from: aldo on July 20, 2009, 06:54:37 PM
Yeah, thanks :) I will add that soon. I forgot I had a couple mods I need to update for 1.1.10 and SMF 2.0 RC1.2. I will get to that tonight.

i really appreciate your time to create mod's, but the lack of mod upgrades makes webmasters also postpone upgrading the whole forum, so how 'bout that update for 2.0?
Title: Re: Avatar Optimization
Post by: netoya on November 10, 2009, 05:20:31 AM
Quote from: aED on July 02, 2009, 06:58:57 AM
What if I moved the avatars out of the attachments directory will it still work?
Any news about it?
Title: Re: Avatar Optimization
Post by: darkNiGHTS on November 16, 2009, 07:53:06 PM
Is this still necessary in SMF2 RC2?
Title: Re: Avatar Optimization
Post by: diamanda on January 31, 2010, 05:01:58 PM
hi - do you have 1.1.11 yet?  thanks...