directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Some basic question
Date Thu, 12 May 2011 09:58:13 GMT
On 5/12/11 11:51 AM, Rajesh Akkineni wrote:
> Hi Emmanuel,
>
> Thank you for quick answers...
>
>>> 4) When do Normalizers get called? LDAP v3 RFC is not talking 
>>> anything about normalization.
>> Normalizers are used because we need to compare values, and some AT 
>> are case insensitive, or spaces aren't meaningful, so we have to 
>> 'normalize' those values to ease the comparison task.
>
> Do these comparisons are done only on SearchOperation? If Yes, When we 
> need to save normalized values fist of all. Why can not we do it in 
> the Comparator itself?
Because every time you do a search and need to compare a value, if it's 
not already normalized, you will have to do it again, and again, and 
again...
>
>
>>> 5) Numeric, Boolean values are stored as strings in store? If Yes, 
>>> Why? Will it not be optimal to store them in more compact form?
>> The Boolean value is supposed o be TRUE or FALSE, nothing else (upper 
>> case). Numeric values are not defined as bounded values.
>>
>> In general, LDAP is about manipulating Strings, so such an 
>> optimization would be totally useless.
>
> So, If I need to do some kind of storage optimization, I can implement 
> my own subclasses of Value and implement my own externalization logic?
> And it should not cause much problem to existing code, right?
Why would you do that ? Again, we didn't spent any time thinking about 
optimizing this part because the gain would be absolutely unnoticed. 
There are way more time consummed in many other parts of the server, and 
any kind of optimisation in this area would just be a waste of time...

Just do one thing : write a simple test looping on some entries, 
searching for a boolean value or an integer value, and check with a 
profiler where exactly the time is being consumed...


-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com


Mime
View raw message