Speed optimization of ServiceClient<> - requesting DTID only once at the time of first call

This commit is contained in:
Pavel Kirienko
2015-05-01 20:53:16 +03:00
parent 1283eb2811
commit 90435991ca
2 changed files with 16 additions and 7 deletions
@@ -84,12 +84,15 @@ static Stream& operator<<(Stream& s, const ServiceCallResult<DataType>& scr)
*/
class ServiceClientBase : protected DeadlineHandler
{
const DataTypeDescriptor* data_type_descriptor_; ///< This will be initialized at the time of first call
protected:
MonotonicDuration request_timeout_;
bool pending_;
explicit ServiceClientBase(INode& node)
: DeadlineHandler(node.getScheduler())
, data_type_descriptor_(NULL)
, request_timeout_(getDefaultRequestTimeout())
, pending_(false)
{ }