diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-07-10 17:29:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-10 17:29:20 (GMT) |
commit | f5198b3027a9a1d1de0aa92b2e62e13d0dc6f47d (patch) | |
tree | 2ad222fdbcb2ba6f7ead0ca41e5a6d98ae4c4287 /src/uscxml/interpreter/InterpreterImpl.cpp | |
parent | 7a2df6c1e8d268cdcc4f7969dd56b5927c38888d (diff) | |
parent | 286f8d747d198a66b81396ba8197b101ae2d59ed (diff) | |
download | uscxml-f5198b3027a9a1d1de0aa92b2e62e13d0dc6f47d.zip uscxml-f5198b3027a9a1d1de0aa92b2e62e13d0dc6f47d.tar.gz uscxml-f5198b3027a9a1d1de0aa92b2e62e13d0dc6f47d.tar.bz2 |
Merge pull request #161 from tklab-tud/sradomski
More performance for microsteppers
Diffstat (limited to 'src/uscxml/interpreter/InterpreterImpl.cpp')
-rw-r--r-- | src/uscxml/interpreter/InterpreterImpl.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/uscxml/interpreter/InterpreterImpl.cpp b/src/uscxml/interpreter/InterpreterImpl.cpp index 9e59cea..414dba2 100644 --- a/src/uscxml/interpreter/InterpreterImpl.cpp +++ b/src/uscxml/interpreter/InterpreterImpl.cpp @@ -340,6 +340,7 @@ void InterpreterImpl::init() { std::ifstream dataFS(sharedTemp + PATH_SEPERATOR + md5(_baseURL) + ".uscxml.cache"); try { if (dataFS.is_open()) { + LOGD(USCXML_INFO) << "Using cache from '" << sharedTemp << PATH_SEPERATOR << md5(_baseURL) << ".uscxml.cache'" << std::endl; std::string cacheStr((std::istreambuf_iterator<char>(dataFS)), std::istreambuf_iterator<char>()); _cache = Data::fromJSON(cacheStr); @@ -349,9 +350,11 @@ void InterpreterImpl::init() { } // get md5 of current document - std::stringstream ss; - ss << *_document; - _md5 = md5(ss.str()); + if (_md5.length() == 0) { + std::stringstream ss; + ss << *_document; + _md5 = md5(ss.str()); + } if (_cache.compound.find("InterpreterImpl") != _cache.compound.end() && _cache.compound["InterpreterImpl"].compound.find("md5") != _cache.compound["InterpreterImpl"].compound.end() && @@ -390,7 +393,7 @@ void InterpreterImpl::init() { } if (!_microStepper) { - _microStepper = MicroStep(std::shared_ptr<MicroStepImpl>(new FastMicroStep(this))); + _microStepper = MicroStep(std::shared_ptr<MicroStepImpl>(new LargeMicroStep(this))); } _microStepper.init(_scxml); |