<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 30, 2015 at 4:39 AM, Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>
On Thu, 29 Jan 2015, silvioprog wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On Thu, Jan 29, 2015 at 7:26 PM, Michael Van Canneyt <<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>> wrote:<br>
      On Thu, 29 Jan 2015, silvioprog wrote:<br>
<br>
            Hello,<br>
<br>
            Please see this patch in attached. Can I send it to bugtracker?<br>
<br>
<br>
      I don't see the point. Why do you need this ?<br>
<br>
<br>
Yes, after a while I saw that my patch seems redundant. But please notice this code below:<br>
<br>
function TFCGIRequest.<u></u>ProcessFCGIRecord(AFCGIRecord: PFCGI_Header): boolean;<br>
...<br>
                        else<br>
                          begin<br>
                          if not assigned(FCGIParams) then<br>
                            FCGIParams := TStringList.Create;<br>
                          GetNameValuePairsFromContentRe<u></u>cord(PFCGI_ContentRecord(<u></u>AFCGIRecord),FCGIParams);<br>
                          end;<br>
<br>
It seems to offer the programmer to create an own cgiparams. Is this "if" just to create this field when the request need to use it?<br>
</blockquote>
<br></span>
Yes. I usually prefer late allocation on an as-needed basis.</blockquote><div><br></div><div>Me too. =)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
What do you think about to create the FCGIParams field in the create of the TFCGIRequest class and remove the "if" from the<br>
ProcessFCGIRecord method?<br>
<br>
I think that the ProcessFCGIRecord method is more triggered than the constructor of the TFCGIRequest class.<br>
</blockquote>
<br></span>
ProcessFCGIRecord is usually called only once or maybe twice if there are really a lot of parameters.<br>
So I seriously doubt it will make a noticeable difference in speed :)<br></blockquote></div><div><br></div><div>Hehe indeed. Keep it as is. =)<br></div><div><br></div>-- <br><div>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a></div>
</div></div>