Skip to content

performance issue with SetTag in Activity with large number of tags #83345

Open
@jaeyoon21

Description

I looked into source of Activity. I realized that Tag is maintained as LinkedList and every SetTag calls lock() and iterates the all tags to check if there is same key or not.
In our case, we have lots of tags, so locking and iterate LinkedLIst for every setTag might be performance issue.

  1. Can we have SetTag (using Map) instead of LinkedList
  2. Can we have SetTag without locking? (in some case, application owner/programmer know that Activity is not called across multiple threads. So no locking is safe.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions