performance issue with SetTag in Activity with large number of tags #83345
Open
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.
- Can we have SetTag (using Map) instead of LinkedList
- 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.