Review Request 114106: KTp/Contact: Get rid few condition double-checks

David Edmundson david at davidedmundson.co.uk
Mon Nov 25 13:42:11 UTC 2013


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

Ship it!


Thanks. 

As for your other comment:
 >There is may be small performance issue we query both contact and self capabilities, while if any of two ret false, another query is needless.

It's very important to analyse where slowdowns are before trying to optimise things. Otherwise it's not going to be the best use of your time

- David Edmundson


On Nov. 25, 2013, 1:32 p.m., Alexandr Akulich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114106/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2013, 1:32 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Repository: ktp-common-internals
> 
> 
> Description
> -------
> 
> KTp/Contact: Get rid few condition double-checks.
> 
> There is may be small performance issue: we query both contact and self capabilities, while if any of two ret false, another query is needless.
> (I talk about code like such one:)
>     bool contactCanHandleFiles = capabilities().fileTransfers();
>     bool selfCanHandleFiles = manager()->connection()->selfContact()->capabilities().fileTransfers();
>     return contactCanHandleFiles && selfCanHandleFiles;
> 
> I didn't change it and hope for smart compiler.
> 
> 
> Diffs
> -----
> 
>   KTp/contact.cpp 64dd49b 
> 
> Diff: http://git.reviewboard.kde.org/r/114106/diff/
> 
> 
> Testing
> -------
> 
> Tested in different states. Capabilities of contacts are same as before this change. There is no crashes or so.
> 
> 
> Thanks,
> 
> Alexandr Akulich
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20131125/be313ba2/attachment.html>


More information about the KDE-Telepathy mailing list