[infinispan-issues] [JBoss JIRA] (ISPN-6484) MarshallableTypeHints.getBufferSizePredictor(Class) is very hot

Sanne Grinovero (JIRA) issues at jboss.org
Mon Jun 20 05:21:00 EDT 2016


    [ https://issues.jboss.org/browse/ISPN-6484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254477#comment-13254477 ] 

Sanne Grinovero edited comment on ISPN-6484 at 6/20/16 5:20 AM:
----------------------------------------------------------------

Note: in the description I suggested the option of using a special purpose data structure.

The reason is that I created a Map-like implementation for Hibernate ORM which is optimised for very fast lookups. It's definitely not a general-purpose Map implementation but it might fit this use case well too.
Generally:
 - it needs to use {{Class}} as a key
 - it's extremely non-efficient at writes (only a good choice if it's very hot at reads but writes are part of the "setup")
 - it's meant for small collections, i.e. design was intended for less than 32 elements.. could work fine with some ~512 I guess but that's not tested.. 

See {{org.hibernate.service.internal.ConcurrentServiceBinding}}.

I'd also experiment the effects of using a "no-op" predictor to see if it's all worth it.


was (Author: sannegrinovero):
Note: in the description I suggested the option of using a special purpose data structure.

The reason is that I created a Map-like implementation for Hibernate ORM which is optimised for very fast lookups. It's definitely not a general-purpose Map implementation but it might fit this use case well too.
Generally:
 - it needs to use {{Class}} as a key
 - it's extremely non-efficient at writes (only a good coice if it's very hot at reads but writes are part of the "setup")
 - it's meant for small collections, i.e. design was intended for less than 32 elements.. could work fine with some ~512 I guess but that's not tested.. 

See {{org.hibernate.service.internal.ConcurrentServiceBinding}}.

I'd also experiment the effects of using a "no-op" predictor to see if it's all worth it.

> MarshallableTypeHints.getBufferSizePredictor(Class) is very hot
> ---------------------------------------------------------------
>
>                 Key: ISPN-6484
>                 URL: https://issues.jboss.org/browse/ISPN-6484
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Core
>            Reporter: Sanne Grinovero
>            Assignee: Galder Zamarreño
>              Labels: performance
>
> This method is very hot, especially on its usage of ConcurrentMap#get 
> Seems worth to try:
> * minimise using this service
> * tune the map
> * use a special purpose data structure



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the infinispan-issues mailing list