IBM-Blockchain-Archive / car-lease-demo

A demonstration using IBM Blockchain to show how the lifecycle of vehicles can be recorded on a blockchain
Other
170 stars 300 forks source link

Performance is very low when create vehicle, please help on that #93

Open chenzhangzi opened 7 years ago

chenzhangzi commented 7 years ago

Have deploy careleasingdemo in local environment and bluemix. After testing, we found it will take almost 7 seconds to complete creating vehicle function(update and transfer also quite slow), but actually it only take less 200 ms to complete function in chaincode from create function entry to exist as we try to print time in .go file. And it illustrates mostly time to be consumed during communication or others. but if use restful API to directly invoke, it takes less than 200 ms. Could any way to improve the nodesdk invocation performance? Cause we are doing POC by using nodesdk and met the same issue. Please help on that. Thx a ton!

liam-grace commented 7 years ago

Due to the EventHub not working in the current blockchain service, we have to wait 30 seconds for the invoke to return a success event. We will re-enable the event hub once the issue is patched or once v1.0 is released onto bluemix.

The rest API is much quicker due to it not waiting for a response from the chaincode before giving the user a response. The invokes are much faster then the 30 second default, but this is the Fabric's default setting if the event hub is turned off