MyBB Community Forums

Full Version: Avatars in base64
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
^
100 base64_decode() for each visitor in a non-visible amount of time??
I WANT THAT PHP ENGINE YOU'RE TALKING ABOUT!!
(2012-01-11, 11:39 PM)TheGarfield Wrote: [ -> ]^
100 base64_encode() for each visitor in a non-visible amount of time??
I WANT THAT PHP ENGINE YOU'RE USING!!

The avatars are already encoded. So why re-encode (word?) them? Again it may add a few MB's to your SQL database I understand that but that compared to a few gigabytes of the images that it would use is something I would care for. SQL database to me is like a set and forget. When I will visit my web disk daily. You all have valid points here and I see them perfectly but they don't apply in some cases. Not every single user of your board will be using 100 replies per page. And if they are then that would be a ton of sql queries there alone (right?). Another option would be HTML5 user-side storage ^_^.
I said decode not encode x(

The avatar will have the same size in the database, it doesn't make their size tinier.. You can't encode a 8 MB file into 64 KB, I hope you know that, otherwise there will be accidents...

I wouldn't like my database to get bigger than it is now just because of avatars...

HF (Labrocca's biggest forum), has 237,139 members, let's say 100,000 of them have avatars, each avatar of 100 KB (which is still very very small, MyBB now accepts 1MB files)

100,000 x 100KB = 10GB...

Hummm, no please...

Same, he has 823 users online now, each user viewing a page of at least 10 avatars,
let's say it takes 0,10 seconds to do the whole thing for each visitor (SQL + decoding) = 82,3 seconds to process all the requests IF THEY DON'T SUBMIT ANY OTHER REQUESTS MEANWHILE.


If that idea is by any chance implemented in 2.0, I will not upgrade :/

END.
(2012-01-11, 11:52 PM)TheGarfield Wrote: [ -> ]I said decode not encode x(

The avatar will have the same size in the database, it doesn't make their size tinier.. You can't encode a 8 MB file into 64 KB, I hope you know that, otherwise there will be accidents...

I wouldn't like my database to get bigger than it is now just because of avatars...

HF (Labrocca's biggest forum), has 237,139 members, let's say 100,000 of them have avatars, each avatar of 100 KB (which is still very very small, MyBB now accepts 1MB files)

100,000 x 100KB = 10GB...

Hummm, no please...

Same, he has 823 users online now, each user viewing a page of at least 10 avatars,
let's say it takes 0,10 seconds to do the whole thing for each visitor (SQL + decoding) = 82,3 seconds to process all the requests IF THEY DON'T SUBMIT ANY OTHER REQUESTS MEANWHILE.


If that idea is by any chance implemented in 2.0, I will not upgrade :/

END.

Ah, my favorite part of the internet. It's got to be everyones way eh? Because one feature is inside MyBB you will refuse to upgrade. I do find that funny. You can also simply just make this an on/off option...

Don't forget what Nathan had said too.
Quote:If anything binary should be stored as BLOB, if not in the file system.
Another ON/OFF suggestion x(

Quote:Because one feature is inside MyBB you will refuse to upgrade.

If it's upgrading for worse, then yes I'd refuse to upgrade, MyBB already has a powerful attachments system, don't you think that they've already thought of making avatars and everything stored in the database?

Hum, it's great to discover a functionality of PHP (such as base64 decoding/encoding), however, PHP DOES NOT guarantee you that no matter how complex your code is, the response time will always be fast.

And about BLOBs, it's a large text, which will in that case, be the content of the image, so it's still the SAME SIZE; unless you GZIP your images or compress them, they're going to have the same size no matter what... <- Logic
(2012-01-12, 12:02 AM)TheGarfield Wrote: [ -> ]Another ON/OFF suggestion x(

Quote:Because one feature is inside MyBB you will refuse to upgrade.

If it's upgrading for worse, then yes I'd refuse to upgrade, MyBB already has a powerful attachments system, don't you think that they've already thought of making avatars and everything stored in the database?

Hum, it's great to discover a functionality of PHP (such as base64 decoding/encoding), however, PHP DOES NOT guarantee you that no matter how complex your code is, the response time will always be fast.

And about BLOBs, it's a large text, which will in that case, be the content of the image, so it's still the SAME SIZE; unless you GZIP your images or compress them, they're going to have the same size no matter what... <- Logic

Actually no. I didn't think they may have already thought of this. I'm sorry I do not have telepathy.
(2012-01-12, 12:09 AM)WebOutfit Wrote: [ -> ]Actually no. I didn't think they may have already thought of this. I'm sorry I do not have telepathy.

^
You're running out of arguments I'd say

Anyway, do more research on the time it's takes for PHP to encode / decode 100 avatars, multiplied by the number of visitors loading different pages a second...

You'll quickly see that your suggestion isn't making anything better...
Your argument has a lot of flaws. Having avatars in DB is less than desirable for anyone with a big board. I'll take drive space over DB space/load any day. I think I have 500GB drive on my dedicated and only use about 50GB. Does anyone really take up all their hosting drive space? It's 1000x more likely imho that the DB will have problems being optimized.

Quote:If that idea is by any chance implemented in 2.0, I will not upgrade

MyBB is not that naive imho.

Quote:If it's upgrading for worse, then yes I'd refuse to upgrade, MyBB already has a powerful attachments system, don't you think that they've already thought of making avatars and everything stored in the database?

I'm probably not going to upgrade HF anyways. Even if it takes 2 more years for MyBB 2.0 to be released. All the work and customizing I've done would take months of dedicated work to upgrade. Just not worth it when I'm very happy with how things are now and I'd unlikely see enough of a performance boost to upgrade. I'm too far away from branch now for easy upgrading. I've not even gone to 1.6.5 yet.

Avatars in DB is a terrible idea.
More than terrible tbqh Sad
(2012-01-12, 12:14 AM)TheGarfield Wrote: [ -> ]More than terrible tbqh Sad

So if it's far worse then a terrible idea, then what is it?
Pages: 1 2 3