Re: Ignoring Case on directories [message #171188 is a reply to message #171183] |
Wed, 29 December 2010 04:43 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 12/28/2010 10:27 PM, jwcarlton wrote:
>>> Apache processes per day is around 500 (although this week, the
>>> average is over 600).
>>
>> And this is a lot?
>
> "A lot" is subjective, I guess. I never said it was a lot, though;
> you're just questioning my need for optimization.
>
> Which I do find pretty amusing, honestly. When I first started
> programming (forever ago), just about EVERY post was about optimize,
> optimize, optimize! Now, every time I ask for advice on making things
> faster (in all groups, not just this one), most of the replies are
> that I'm wasting my time.
>
> Times change, I guess :-)
>
There is a lot of difference between the mainframe I started on, with
4,000 bytes (NOT 4K!) of core memory and today's PC's. Back then every
byte counted and in many cases instruction cycles counted. Not so much
any more.
Not to say you shouldn't optimize - but you shouldn't PREMATURELY
optimize. Wait to see if you have a problem, then fix it.
>
>>> I don't think the "why" is terribly relevant to the thread,
>>
>> But if you knew so much already, you wouldn't be asking for help. You
>> should let us decide what information we need in order to be able to
>> give you a good answer.
>
> True. But all I was really asking was whether there was a PHP command
> that could help me to find a directory while ignoring case; I wasn't
> really asking for help on improving the system (yet, anyway). Don't
> get me wrong, I DO appreciate the help... but in this case, I'm just
> trying to eliminate a single query, which, at best, would improve the
> site by milliseconds.
>
> Besides, the most common complaint that I get is that I give too much
> information, making my posts long and hard to read! LOL
>
>
It has nothing to do with PHP. The OS is what searches the directories;
PHP just provides a search function to the OS's file system, including
searching.
>> And it is totally impossible to have all new directories created in
>> lowercase and then rename all the others to lowercase?
>
> Impossible? Not at all! Just more work than I'm able to do at the
> moment. I'm just trying to eliminate a single MySQL query, and was
> hoping for a quick-and-painless alternative.
For now you're better off sticking with the query and when you have time
redoing your entire architecture to handle a large number of users.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|