Affects Version/s: 3.4.0.RELEASE
Fix Version/s: None
Environment:OS: Windows 7 Enterprise
RAM: 8 GB
Processor: Intel(R) Core(TM) i7-3740 QM CPU @ 2.70 GHz
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
I am using the Spring Data Mongo API query methods to store and fetch POJOs in and out of MongoDB. While the query execution times seem slow for the number of documents I am fetching, the more troubling problem is the growth in the execution time with each query. For example, I call the Mongo repository method "pojoRepository.findAll()" and its returns 44 documents in roughly 2.5 ms. When I run the same exact query again it takes ~7.2 ms. The next execution increases by about the same about ending up a little less than 13 ms. The next runs in ~18 ms, and so on and so on. If there are only 22 documents to fetch, the growth factor is smaller and likewise, if there are 66 documents the growth factor is larger.
I have eliminated MongoDB as the mongo client runs the same query in sub-second time, every time. I have tried using the Cacheable annotation API but, there is no effect, I assume because I am fetching ALL documents where the Cacheable functionality seems to depend on and leverage a field (preferably indexed) as query filter criteria. I was going to try different versions of Java but, thought I would post this problem in the meantime to see if anyone has any ideas about what's going on.