MongoDB開発者とのチャットで問題が見つかりました:Spring Framework 4.0.0を実行していましたが、速度が遅いのはこの問題に関連しています:
https://jira.spring.io/browse/SPR-11335
Springをバージョン4.0.1(またはそれ以降)に更新すると、問題が解決します。
これは、問題への私の呼び出しからのスタックトレースでした:
at java.lang.Class.getGenericSignature(Native Method)
at java.lang.Class.getGenericInterfaces(Class.java:813)
at org.springframework.core.SerializableTypeWrapper$2.getType(SerializableTypeWrapper.java:106)
at org.springframework.core.SerializableTypeWrapper$TypeProxyInvocationHandler.invoke(SerializableTypeWrapper.java:220)
at com.sun.proxy.$Proxy5.equals(Unknown Source)
at org.springframework.util.ObjectUtils.nullSafeEquals(ObjectUtils.java:252)
at org.springframework.core.ResolvableType.equals(ResolvableType.java:682)
at org.springframework.util.ObjectUtils.nullSafeEquals(ObjectUtils.java:252)
at org.springframework.core.ResolvableType.variableResolverSourceEquals(ResolvableType.java:719)
at org.springframework.core.ResolvableType.equals(ResolvableType.java:683)
at org.springframework.util.ConcurrentReferenceHashMap$Segment.findInChain(ConcurrentReferenceHashMap.java:571)
at org.springframework.util.ConcurrentReferenceHashMap$Segment.getReference(ConcurrentReferenceHashMap.java:439)
at org.springframework.util.ConcurrentReferenceHashMap.getReference(ConcurrentReferenceHashMap.java:238)
at org.springframework.util.ConcurrentReferenceHashMap.get(ConcurrentReferenceHashMap.java:217)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1018)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:998)
at org.springframework.core.ResolvableType.getGenerics(ResolvableType.java:489)
at org.springframework.core.ResolvableType.getGeneric(ResolvableType.java:451)
at org.springframework.core.convert.TypeDescriptor.getElementTypeDescriptor(TypeDescriptor.java:305)
at org.springframework.core.convert.TypeDescriptor.equals(TypeDescriptor.java:456)
at org.springframework.util.ObjectUtils.nullSafeEquals(ObjectUtils.java:252)
at org.springframework.core.convert.support.GenericConversionService$ConverterCacheKey.equals(GenericConversionService.java:436)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:996)
at org.springframework.core.convert.support.GenericConversionService.getConverter(GenericConversionService.java:235)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:162)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleRead(MappingMongoConverter.java:715)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readCollectionOrArray(MappingMongoConverter.java:773)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1048)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:77)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:999)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:755)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:256)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:249)
at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:261)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:249)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:223)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:187)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:183)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:77)
at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1966)
at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1662)
at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1487)
at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1471)
at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:527)
at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:518)
at com.sytrue.record.persistence.repo.impl.RecordRepositoryImpl.findAsMapIds(RecordRepositoryImpl.java:139)