[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request: Cleanup the use of HTTPProtocol::httpClose
From:       "Andreas Hartmetz" <ahartmetz () gmail ! com>
Date:       2011-10-26 9:33:53
Message-ID: 20111026093353.8874.16831 () vidsolbach ! de
[Download RAW message or body]

> On Oct. 12, 2011, 10:51 p.m., Andreas Hartmetz wrote:
> > This changeset changes some important parts without obvious (to me) gai=
n.
> > Before I spend an hour or two thinking through all the cases, which may=
 or may not catch potential regressions, I'd like to know what this does fo=
r us.
> > The current approach of acting a bit dumb seems more robust.
> =

> Dawit Alemayehu wrote:
>     Here is the gains we get out of this change:
>     =

>     #1. Keep persistent connection on non-connection related errors. Ther=
e is no reason to tear down our connection to a server on errors such as ER=
R_USR_CANCELED.
>     #2. Avoid unnecessary performance hit by not calling httpClose multip=
le times. This is especially true for ::get which is by the far the most ca=
lled function in this ioslave. For no good reason however, httpClose is cal=
led at least two times everytime ::get is successfully invoked.
>     =

>     BTW, if you tell me the use cases which I should test, then I will be=
 willing to do the regression testing. I have already gone through each of =
the ioslave functions to see if this change will affect any of them. I have=
 even tested the most commonly used ones (get, post, put) through a proxy s=
erver to see if there are any regressions. So far I have not encountered on=
e.
> =

> Dawit Alemayehu wrote:
>     Can I commit this change ? Or do you still have objections to it ?

I am quite busy right now. If I don't get around to having a look until Mon=
day morning, feel free to just "ship it" then. I'll try to do it, though.


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102801/#review7282
-----------------------------------------------------------


On Oct. 25, 2011, 3:55 p.m., Dawit Alemayehu wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102801/
> -----------------------------------------------------------
> =

> (Updated Oct. 25, 2011, 3:55 p.m.)
> =

> =

> Review request for kdelibs and Andreas Hartmetz.
> =

> =

> Description
> -------
> =

> This patch cleans up where and under what circumstances httpClose gets ca=
lled. This is done to avoid unnecessary invocation of httpClose. With this =
patch the function will only get called under the following circumstances:
> =

> #1. from functions that only call proceedUntilResponseHeader directly.
> #2. from proceedUntilResponseContent.
> #3. from error
> #4. from davFinished.
> =

> The main purpose of this change is to avoid httpClose being called multip=
le times on every GET request which is by far the most invoked call.
> =

> =

> Diffs
> -----
> =

>   kioslave/http/http.h 4c62841 =

>   kioslave/http/http.cpp 235ce7d =

> =

> Diff: http://git.reviewboard.kde.org/r/102801/diff/diff
> =

> =

> Testing
> -------
> =

> =

> Thanks,
> =

> Dawit Alemayehu
> =

>


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/102801/">http://git.reviewboard.kde.org/r/102801/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On October 12th, 2011, 10:51 p.m., <b>Andreas \
Hartmetz</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This changeset changes some important parts without obvious (to me) \
gain. Before I spend an hour or two thinking through all the cases, which may or may \
not catch potential regressions, I&#39;d like to know what this does for us. The \
current approach of acting a bit dumb seems more robust.</pre>  </blockquote>




 <p>On October 13th, 2011, 4:57 p.m., <b>Dawit Alemayehu</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Here is the gains we get \
out of this change:

#1. Keep persistent connection on non-connection related errors. There is no reason \
to tear down our connection to a server on errors such as ERR_USR_CANCELED. #2. Avoid \
unnecessary performance hit by not calling httpClose multiple times. This is \
especially true for ::get which is by the far the most called function in this \
ioslave. For no good reason however, httpClose is called at least two times everytime \
::get is successfully invoked.

BTW, if you tell me the use cases which I should test, then I will be willing to do \
the regression testing. I have already gone through each of the ioslave functions to \
see if this change will affect any of them. I have even tested the most commonly used \
ones (get, post, put) through a proxy server to see if there are any regressions. So \
far I have not encountered one.</pre>  </blockquote>





 <p>On October 23rd, 2011, 4:09 p.m., <b>Dawit Alemayehu</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Can I commit this change \
? Or do you still have objections to it ?</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I am quite busy right \
now. If I don&#39;t get around to having a look until Monday morning, feel free to \
just &quot;ship it&quot; then. I&#39;ll try to do it, though.</pre> <br />








<p>- Andreas</p>


<br />
<p>On October 25th, 2011, 3:55 p.m., Dawit Alemayehu wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kdelibs and Andreas Hartmetz.</div>
<div>By Dawit Alemayehu.</div>


<p style="color: grey;"><i>Updated Oct. 25, 2011, 3:55 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This patch cleans up where and under what circumstances httpClose gets \
called. This is done to avoid unnecessary invocation of httpClose. With this patch \
the function will only get called under the following circumstances:

#1. from functions that only call proceedUntilResponseHeader directly.
#2. from proceedUntilResponseContent.
#3. from error
#4. from davFinished.

The main purpose of this change is to avoid httpClose being called multiple times on \
every GET request which is by far the most invoked call.</pre>  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kioslave/http/http.h <span style="color: grey">(4c62841)</span></li>

 <li>kioslave/http/http.cpp <span style="color: grey">(235ce7d)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/102801/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic