[Nepomuk] Review Request: Optimize sending of LiteralValue over the socket

Aleix Pol Gonzalez aleixpol at gmail.com
Wed Aug 29 15:07:20 UTC 2012



> On Aug. 29, 2012, 2:49 p.m., Sebastian Trueg wrote:
> > What code duplication do you mean?
> > This looks fine. I suppose it means another speed up?
> 
> Vishesh Handa wrote:
>     Well, the same changes have been made to datastream.cpp [Server code] and socketstream.cpp [Client code].
>     
>     According to Aleix, and the callgrind output, it reduced one very long query from 1 sec to about 400 msecs. We couldn't seem to optimize it after that.

FWIW, in this case I think I got overexcited.

I'm unsure what's the reason but it only takes 400ms if the nepomukserver just started. Otherwise it stayed at ~800ms. Which still is an improvement, but not as spectacular.


- Aleix


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


On Aug. 27, 2012, 10:30 a.m., Vishesh Handa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106233/
> -----------------------------------------------------------
> 
> (Updated Aug. 27, 2012, 10:30 a.m.)
> 
> 
> Review request for Nepomuk, Soprano, Aleix Pol Gonzalez, and Sebastian Trueg.
> 
> 
> Description
> -------
> 
>     Optimize sending of LiteralValue over the socket
>     
>     Instead of sending it as <literal-value-string><literal-value-type>.
>     Send it as a string/int/bool/whatever when possible, and only send it
>     with the full type as a last resort.
>     
>     This results in code duplication, but that should be fixed by deriving
>     both the classes from a common class.
> 
> 
> Diffs
> -----
> 
>   client/socketstream.cpp 7178580 
>   server/datastream.cpp 17c0c41 
> 
> Diff: http://git.reviewboard.kde.org/r/106233/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Vishesh Handa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20120829/7583b944/attachment.html>


More information about the Nepomuk mailing list