-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Avoid creating InfoWindow iterator if no InfoWindows are shown #9477
Conversation
@@ -56,10 +58,6 @@ boolean isAllowConcurrentMultipleOpenInfoWindows() { | |||
return allowConcurrentMultipleInfoWindows; | |||
} | |||
|
|||
List<InfoWindow> getInfoWindows() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to remove this getter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was unused & not part of our public api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobrun 👍
c2bd866
to
41f7bf1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor detail.
@@ -31,12 +32,13 @@ | |||
private MapboxMap.OnInfoWindowCloseListener onInfoWindowCloseListener; | |||
|
|||
InfoWindowManager() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to keep this empty constructor.
790b7ae
to
d92f726
Compare
d92f726
to
dabb168
Compare
Every time we receive a region change event, we are synchronizing Android SDK view components on top of the map. With profiling of gestures in #9476, I'm noticing we are allocating iterators for InfoWindows while no InfoWindows are shown. Checking for an empty avoids creating unneeded allocations.