In getting up and running I’m seeing basic queries (inserts/lookups/queries) take about 30ms. I think this is an issue with the way I’m reusing (or failing to re-use) the instantiated recordStore instance. I’ve roughly followed the steps from the GettingStarted.md tutorial and I’m starting my queries like so:
FDBRecordStore.newBuilder()
.setMetaDataProvider(recordMetaData)
.setContext(context)
.setKeySpacePath(path)
.createOrOpen();
This call alone seems to take ~7ms or so. From the tutorial the “The FDBRecordStore
object only has the lifetime of a single transaction”. Is it possible to cache some or all of this instantiation to reuse between transactions? Is there possibly something else wrong with my setup (I’m using a local development foundationdb instance)? Any general guidance around what kind of latency I should be expecting from simple queries?