Hello!
I need to put <Long, Map<Integer, String>> data structure to cache.
I have found out that there is a BinaryObject, that solves the problem of
dynamic fields list and improves cache query operations performance.
But I faced a performance issue.
I have 3 node cluster with 5GB of RAM. I want to add 5 000 entries into
cache.
In case I put <Long, Map<Integer, String>> it takes over* 6,8 seconds*
In case I put <Long, BinaryObject> it takes *382 seconds*
I use atomic partitioned cache. Here is code example with BinaryObject:
Map<Person, List<Integer>> persons = ... //original data
structure
IgniteCache<Long, BinaryObject> personCache =
Ignition.ignite().cache(PERSON_CACHE);
IgniteBinary binary = Ignition.ignite().binary();
persons.forEach((person, integers) -> {
BinaryObjectBuilder valBuilder =
binary.builder("categories");
integers.stream().forEach((integer -> {
valBuilder.setField(String.valueOf(integer),
integer);
}));
personCache.put(person.getId(), valBuilder.build());
});
Is that expected behaviour?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/BinaryObject-performance-issue-tp4375.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.