Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6484

MarshallableTypeHints.getBufferSizePredictor(Class) is very hot

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Enhancement Enhancement
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • Core

      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

            [ISPN-6484] MarshallableTypeHints.getBufferSizePredictor(Class) is very hot

            Infinispan issue tracking has been migrated to GitHub issues: https://github.com/infinispan/infinispan/issues
            If you still want this issue to be worked on, create a new issue on GitHub and link this issue.

            Tristan Tarrant added a comment - Infinispan issue tracking has been migrated to GitHub issues: https://github.com/infinispan/infinispan/issues If you still want this issue to be worked on, create a new issue on GitHub and link this issue.

            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.

            Sanne Grinovero (Inactive) added a comment - - edited 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.

              Unassigned Unassigned
              sgrinove Sanne Grinovero (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: