Skip to content

Replace the map<Long,Object> in dubbo with longObjectMap #2882

Closed

Description

@carryxyh

We can use longObjectMap to replace Map<Long, Object> in dubbo to improve performance.

We need to do the following:

  1. Organize the map that can be replaced
  2. Perform replacement work

我们可以使用longObjectMap来替换dubbo中的Map<Long,Object>来提升性能。

我们需要做下面的事情:

  1. 整理可以替换的Map
  2. 进行替换工作

Activity

  1. self-assigned this
    on Dec 4, 2018
  2. htynkn commented on Dec 4, 2018

    @htynkn
    Member

    this work make sense, but do we have a official way to measure performance improvement? we don't have benchmark running in CI or other stable platform.

  3. carryxyh commented on Dec 4, 2018

    @carryxyh
    MemberAuthor

    good question. At the moment we really lack the internal benchmark. I think you can add a benchmark to the module. The performance of the new submission benchmark cannot be significantly lower than the previous benchmark results. What do u think?

  4. water-coder commented on Dec 12, 2018

    @water-coder
    Contributor

    for this issue
    I want to do this job of using longObjectMap replacing LongObjectMap.
    I am willing to take this task and I will start doing it.

  5. bpaull1981 commented on Dec 12, 2018

    @bpaull1981
  6. carryxyh commented on Dec 13, 2018

    @carryxyh
    MemberAuthor

    @bpaull1981
    Hi, seems like @water-coder has claimed this job.

    @water-coder I'd like to help u to finish this.

  7. water-coder commented on Dec 13, 2018

    @water-coder
    Contributor

    @carryxyh
    OK,thx. I will try my best to do this.

  8. lexburner commented on Dec 19, 2018

    @lexburner
    Contributor

    @carryxyh do you mean that the LongObjectHashMap is io.netty.util.collection.LongObjectHashMap<V>? I just take a look at the usage of dubbo existing code, the Map<Long, Object> almost are java.util.concurrent.ConcurrentHashMap,but the LongObjectHashMap is not Thread Safe . How do think about it ?

  9. carryxyh commented on Dec 19, 2018

    @carryxyh
    MemberAuthor

    @lexburner
    I think we should have a benchmark about the sync long object map and concurrent map.
    Personally think the concurrent map is better, but we should have a benchmark about this two cases.
    The person who claimed this task will go to the benchmark, we have already passed the mail.

    Another thing, maybe my description is problematic, we are going to replace longobjectmap and other maps such as intobjectmap. Not just longobjectmap.

    And the longobjectmap and intobjectmap has many impls (not just in netty). Could u give some ideas about this?

  10. lexburner commented on Dec 19, 2018

    @lexburner
    Contributor
  11. water-coder commented on Dec 19, 2018

    @water-coder
    Contributor

    @lexburner I think your comments are very direct. At present, the stand-alone test, longObjectMap and hashMap in the number of puts reached a million level, the performance gap is very large, you said the thread safety problem, concurrent performance and memory testing, it is indeed should consider and come up with accurate evidence to support. There are also tests of actual scenes that are more convincing.

  12. removed their assignment
    on Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions