I am sorry but I cannot share my data.
Here is the code I use on both machines to test the CouchDB and ArangoDB accesses. It is minimalist, brings in no personal code both on CouchDB and on ArangoDB, uses HTTP and works in local.
import requests
import time
LOOP = 500
CDB_SESS = requests.Session()
CDB_SESS.stream = False
CDB_SESS.headers.update({'content-type': 'application/json; charset=utf-8'})
ADB_SESS = requests.Session()
ADB_SESS.stream = False
ADB_SESS.headers.update({'content-type': 'application/json; charset=utf-8'})
if __name__ == '__main__':
print 'CouchDB'
START = time.time()
for x in range(LOOP):
_rsp = CDB_SESS.get('http://localhost:5984/')
value = _rsp.json()
STOP = time.time()
print (STOP - START)
print 'ArangoDB'
START = time.time()
for x in range(LOOP):
_rsp = ADB_SESS.get('http://localhost:8529/_db/_system/_api/version')
value = _rsp.json()
STOP = time.time()
print (STOP - START)
Both loops differ only by the used url. The databases run only internal code, not mine, right?
Is it not reasonable to think that if the bottleneck comes from Python or from Requests, this one acts here in the same way on the two databases?
Today I put aside the PC and worked on the MAC.
I uninstalled ArangoDB (brew uninstall arangodb) and cleaned the directory var/lib of its contents.
Then I reinstalled it (brew install arangodb) without transferring my data or any Foxx app. One virgin install. My only operation is to have modified v8-contexts=1.
I launched the test above, 3 times. Here is the result:
- CouchDB: 1.54s, 1.49s, 1.49s
- ArangoDB: 1.05s, 1.04s, 1.05s
The results are identicaly bad as those obtained previously.
Do I have to incriminate my data (not present) or my Foxx app (not present)?
require
, and all app routes will stay in cache. "development" mode means that each "require" in your app will actually recompile the module, and app routes will be rebuilt on every HTTP request. This makes your app stay up-to-date, but definitely has an overhead and shouldn't be used in production. But it's unclear to me where all the execution time is spent: in loading the app or in executing the app code? E.g. the bottleneck may be inside the app's code, and may even be unaffected by the production/development setting. – stj--javascript.v8-contexts=1
(not advised for production environments) to know that accessing it once will have all contexts prepared. – dothebart