Review and changes from Jocelyn Fiat

In this case -- concerning that the strings are not that large -- I 
prefer the "+".
Especially here, where we have a complicated format.

Of course this is a trade-off...


Am 11.06.2014 11:03, schrieb Jocelyn Fiat:
>
> In 
> library/server/authentication/http_authorization/src/http_authorization.e:
>
> > +			-- also known as HA1 in the related wikipedia page.
> > +			--
> > +			-- If the algorithm directive's value is "MD5" or unspecified, then HA1 is
> > +			--    {HA1} = {MD5}({A1}) = {MD5}( {username} : {realm} : {password} )
> > +			--
> > + 			-- If the algorithm directive's value is "MD5-sess", then HA1 is
> > +			--    {HA1} = {MD5}({A1}) = {MD5}({MD5}( {username} : {realm} : {password} ) : {nonce} : {cnonce} )			
> > +		local
> > +			a1: STRING_8
> > +		do
> > +			check is_md5_algorithm: a_server_algorithm = Void or else a_server_algorithm.is_case_insensitive_equal_general ("md5") end
> > +			create a1.make_from_string (a_server_username)
> > +			a1.append_character (':')
> > +			a1.append (a_server_realm)
> > +			a1.append_character (':')
> > +			a1.append (a_server_password)
>
> minor improvement
> s := a + b + c + d
> will create many intermediate string objects such as
> s := (a + (b + (c + d)))
> here each pair of parenthesis is a new string object.
>
> so it is better for memory usage (and GC usage) to do
> create s.make_from_string (a)
> s.append (b)
> s.append (c)
> s.append (d)
>
> Obviously this is a minor optimization and does not make the code 
> easier to read.
> But in web development , memory is always a critical point, so better 
> have minor optimization especially on feature that is often used.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/gruberda/EWF/pull/1/files#r13639704>.
>