|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
PHP, Database, Server admin experts.. Got a question
When a tgp script crops and save thumbnail images, should it....
1. Save it all to one folder? Like this... www.domain.com/thumbs/imageid.jpg www.domain.com/thumbs/imageid.jpg www.domain.com/thumbs/imageid.jpg or 2. Save it into image id subfolders? Like this... www.domain.com/thumbs/imageid/1.jpg www.domain.com/thumbs/imageid/1.jpg www.domain.com/thumbs/imageid/1.jpg Which is better for output, PHP, database, and server performance? Or does it even make a difference? Thanks in advance! |
|
|
|
|
|
#2 |
|
Confirmed User
Industry Role:
Join Date: Sep 2007
Location: Los Angeles
Posts: 2,706
|
if you plan to have over 30,000 images you will want to do it option #2
__________________
www.SwiftNode.com |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Aug 2002
Posts: 56
|
If you have a lot of images, option #2 for sure, ideally even splitting it up so that for image123.jpg it's images/1/2/123.jpg or something similar.
If you have too many images (say, 1000 as a nice round number) per directory, you're going to start incurring performance hits. |
|
|
|
|
|
#4 |
|
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Yep. Even directory hashing can only do so much... and god forbid doing a full lookup.
__________________
|
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: Apr 2005
Location: Lazyness is a lifestyle
Posts: 3,201
|
At what point should it become a problem(in terms of 10k thumbs increments) if you have a script that does it option 1 style?
__________________
![]() A girl once told me "Give me 8 inches and make it HURT". So, I fucked her twice and hit her with a brick. |
|
|
|
|
|
#6 |
|
CURATOR
Join Date: Jul 2004
Location: the attic
Posts: 14,572
|
It's good to see that there are still technical, webmastery type threads here on GFY. I can't tell you how I much I learned here. Truly, I was and remain the noob.
__________________
tada! |
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Mar 2007
Posts: 922
|
you should start with the system you intend to use all along, IE option #2. If you go with option #1 eventually you're going to have to change the system, which is more work than you originally needed to do.
__________________
Vote Bill Cosby 2012 |
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
Thanks! I guess I am going to go with option #2.
|
|
|
|
|
|
#9 |
|
Confirmed User
Join Date: Apr 2005
Location: Lazyness is a lifestyle
Posts: 3,201
|
They are pretty rare nowadays, but I always hop in to see if there's anything interesting going on.
__________________
![]() A girl once told me "Give me 8 inches and make it HURT". So, I fucked her twice and hit her with a brick. |
|
|
|
|
|
#10 | |
|
Confirmed User
Industry Role:
Join Date: Sep 2007
Location: Los Angeles
Posts: 2,706
|
Quote:
not to mention querying a directory with 30,000 (or 10,000 even) files would take forever.
__________________
www.SwiftNode.com |
|
|
|
|
|
|
#11 |
|
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Another good option is to use is date hashing, so if you want to clean things out, it's quite simple.
/YYYY/MM/DD/thumb... which makes the linking a little uglier, but it's a much better solution than /firstletterornumber/second/thumb - from the standpoint of if you want to clean things up and eventually remove them.
__________________
|
|
|
|
|
|
#12 | |
|
Confirmed User
Join Date: Apr 2005
Location: Lazyness is a lifestyle
Posts: 3,201
|
Quote:
thumbs]$ ls -al|wc -l 6890
__________________
![]() A girl once told me "Give me 8 inches and make it HURT". So, I fucked her twice and hit her with a brick. |
|
|
|
|
|
|
#13 |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
Yeah that was one of the main reasons why I asked because a couple of scripts used option #1 but usually the better/popular scripts use option #2
|
|
|
|
|
|
#14 | |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
Quote:
|
|
|
|
|
|
|
#15 |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
|
|
|
|
|
|
#16 | |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
Quote:
|
|
|
|
|
|
|
#17 |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
So is it ok to have over 30,000 folders in 1 directory or do folders count has files too?
|
|
|
|
|
|
#18 |
|
Confirmed User
Industry Role:
Join Date: Sep 2007
Location: Los Angeles
Posts: 2,706
|
folders are fine
__________________
www.SwiftNode.com |
|
|
|
|
|
#19 |
|
Confirmed User
Join Date: Aug 2002
Location: Sydney, Australia
Posts: 6,103
|
Good thread, helped me with a recent problem on my tube script. Thanks guys.
__________________
--- |
|
|
|
|
|
#20 | |
|
Confirmed User
Join Date: Mar 2002
Location: Los Angeles
Posts: 252
|
OK thanks for the information. So it's ok then to have lets say 2,000,000 subfolders in one directory as long as not too many files in each subfolders.
Quote:
Thanks again guys, gotta let my programmer know. |
|
|
|
|
|
|
#21 | |
|
Confirmed User
Join Date: Apr 2005
Location: Lazyness is a lifestyle
Posts: 3,201
|
The official answer from the staff at JMB, what do you think?
Quote:
__________________
![]() A girl once told me "Give me 8 inches and make it HURT". So, I fucked her twice and hit her with a brick. |
|
|
|
|