Hello Mike, With the new Ignite 2.0 architecture, GridCacheMapEntry does not add any overhead because the data is stored off-heap (unless you have on-heap cache enabled) and the GridCacheMapEntry is created only temporarily.
Anyways, answering your questions: 1) The reference to GridCacheContext in all entries of the same cache is the same. Theoretically, it may be possible to pass this reference to every single method on GridCacheMapEntry, however, there might be tricky places when the context is not around in local variables, so this task may require quite a bit of refactoring. 2) GridCacheEntryExtras usage pattern depends on whether this is a transactional or atomic cache. Back in Ignite 1.x I would say that this field is null most of the time, but in Ignite 2.x, again, it is very likely that extras are not null when the entry is used. --AG 2017-09-26 18:19 GMT+03:00 endianignite <endianign...@gmail.com>: > Hi Igniters, > > I have been looking in to the per-entry overhead for Ignite cache entries > and have a couple of questions. > > 1. Does each GridCacheMapEntry require a reference to GridCacheContext<?, > ?> > or could this field be removed/optimized in some way? Is the > GridCacheContext instance the same for every entry in a particular cache? > > 2. Is the GridCacheMapEntry extras field (a reference to > GridCacheEntryExtras) often/usually null? If so, could we find a clever way > to remove this field and save a further 8 bytes? > > The reason for asking is that I am looking at a use-case where object sizes > are very small, but the number of objects is very large, and therefore the > overhead is substantial. In this particular case, the overhead is 70-75% > of > the consumed memory. > > I look forward to hearing your thoughts. > > Regards > Mike > > > > -- > Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/ >