Announcement

  •  » Engine
  •  » Case sensitivity

#31 2011-05-13 21:49:39

LucMorizur
Member
Vienne (Isère) - France
2009-04-30
168

Re: Case sensitivity

stim wrote:

I mean to say that I strongly disagree with this solution because it is not scalable at all. Therefore, I don't like to settle with the last commit. Because: if it is not scalable, it's not a actually a feature of the software, since (power)users will be obliged to turn it off eventually, as their traffic grows.

I think everybody agrees that the best code should be prefered :-) .

Just for my personal knowledge: what do you mean by "it is not scalable at all"? (I'm not a programmer, but I'm working on it ;-) !)


Our gallery : Le Site à Nous (a silly name in french, but here I don't care ;-) ! )
An event, a new gallery ? Plugin Event Cats
My test gallery : Tests Piwigo de Luc
Thanksalot for this beautiful project.

Offline

 

#32 2011-05-13 21:52:23

flop25
Piwigo Team
2006-07-06
6900

Re: Case sensitivity

I think it was thinking of scalable "adaptable à tout les cas", not "évolutif". Isn't it ?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#33 2011-05-14 22:18:34

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13182

Re: Case sensitivity

scalable means that the script won't crash when jumping from 10 to 10,000,000 users in the database.


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#34 2011-05-14 22:25:23

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13182

Re: Case sensitivity

As usual, my opinion is to "keep it simple".

By default the authentication is case sensitive, and this can be change only in the configuration file, not in the web administration interface, so let's say only 0.01% of Piwigo users will change it (and it's a big number in my opinion)

Then starting from how many users will the "retrieve all before compare" solution will start to generate performance issues? 10,000 users ? OK, that's 0.001% of Piwigo users (the vast majority of Piwigo installation has between 10 and 100 users I think).

So please try to keep things simple. One day someone will have to maintain this code, he will be grateful if you keep things clear and easy.


If you're sure the SQL function "LOWER" is 100% compatible with MySQL/PostgreSQL/SQLite then it's fine, let's go with it, but be sure :-)


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#35 2011-05-15 13:49:30

stim
Member
Netherlands
2011-04-24
10

Re: Case sensitivity

With those figures (0.01% * 0.001%) it seems indeed that there is little need to optimize this. However, it still doesn't feel right, we just know it's gonna be an issue some day...

On the other hand, using LOWER eliminates the use of indexes by the database, so that solution will probably also run into performance issues at some point.

Furthermore:

plg wrote:

If you're sure the SQL function "LOWER" is 100% compatible with MySQL/PostgreSQL/SQLite then it's fine, let's go with it, but be sure :-)

I'm not sure, I just noticed that the function is supported in all three systems.
But a little search showed me this: sqlite issues. The same problems that strtolower has.

I guess I should settle with the current commit. That 0.0001% of users can probably change the code themselves, optimizing for their back-end.
(Is it an option to wrap the search_case_username function in if(!is_callable('search_case_username')){[...]} such that it can easily be overridden?)

Last edited by stim (2011-05-15 13:50:25)

Offline

 

#36 2011-05-15 15:04:11

LucMorizur
Member
Vienne (Isère) - France
2009-04-30
168

Re: Case sensitivity

stim wrote:

That 0.0001% of users can probably change the code themselves, optimizing for their back-end.

For any Piwigo user that wants a nice management of case and accents on usernames (for a very large amount of unicode characters), and also who would like to implement a personal version of this management (to be coded "soon" :-/ ), without needing any specific PHP extension, Éric Whiler and me have developed [extension by Eric] LCAS ;-) ! It has been tested on a gallery with more than 2000 users registered, and no performance issue was to be noticed for visitors.

(Yet I must admit that the code is... very basic :-/ . But it works, nothing else to say :-)) !)


Our gallery : Le Site à Nous (a silly name in french, but here I don't care ;-) ! )
An event, a new gallery ? Plugin Event Cats
My test gallery : Tests Piwigo de Luc
Thanksalot for this beautiful project.

Offline

 
  •  » Engine
  •  » Case sensitivity

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact