You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
As flagged by #3179, we use std::set and std::map in places where ordering is not important. In these cases, we should replace with the unordered versions of these containers (faster).
Based on some initial testing @lucaswoj and I have discovered that not all std::set and std::map can be converted to their unordered versions as there still is code in Core GL that relies on their implicit ordering. @jfirebaugh also mentioned that there are places were this is explicitly noted in the source code as well. To make life easier and more transparent, @lucaswoj and I will document these cases as we encounter them in the table below:
Changed to map only list as @lucaswoj is working with a giant checklist below.
mbgl::annotation::annotatation_manager.hpp
test/algorithm/covered_by_children.cpp
mbgl::algorithm::generate_clip_ids.hpp
mbgl::algorithm::generate_clip_ids.cpp
mbgl::geometry::glyph_atlas.cpp
mbgl::geometry::glyph_atlas.hpp
mbgl::text::glyph.hpp
mbgl::text::glyph_set.cpp
mbgl::text::glyph_set.hpp
mbgl::text::glyph_store.hpp
test/algorithm/generate_clip_ids.hpp
test/algorithm/mock.hpp
test/sprite/sprite_store.cpp
Note
While attempting to convert the glyph code to unordered_map it was discovered that it had a dependency on getStencils() which in turn needs to make use of .rend() in generate_clip_ids.cpp. Since this is a larger refactor the decision was made to punt on this part of the refactor for now and take the improvements that we've gotten so far.
Activity
bleege commentedon Sep 12, 2016
Based on some initial testing @lucaswoj and I have discovered that not all
std::setandstd::mapcan be converted to theirunorderedversions as there still is code in Core GL that relies on their implicit ordering. @jfirebaugh also mentioned that there are places were this is explicitly noted in the source code as well. To make life easier and more transparent, @lucaswoj and I will document these cases as we encounter them in the table below:Changed to map only list as @lucaswoj is working with a giant checklist below.
Note
getStencils()which in turn needs to make use of.rend()ingenerate_clip_ids.cpp. Since this is a larger refactor the decision was made to punt on this part of the refactor for now and take the improvements that we've gotten so far.lucaswoj commentedon Sep 12, 2016
👉 #6325
jfirebaugh commentedon Sep 12, 2016
src/clipperis third-party code and as a rule we avoid modifying it.std::setwis a false positive. All the others look like legitimate candidates.lucaswoj commentedon Sep 13, 2016
Remaining Tasks
std::set[core] Convert uses of std::set to std::unordered_set #6325std::multimap[core] Convert uses of std::set to std::unordered_set #6325std::mapUnordered Map #6324[core] #3980 - Putting friend class SymbolLayout back
lucaswoj commentedon Sep 15, 2016
Re-opening. @bleege has merged his PR addressing
std::mapusage. My PR addressingstd::setusage is still pending.There are also a few cases that were not resolved in either PR that should:
bleege commentedon Sep 15, 2016
Re-opening as my fixit PR #6336 closed this automatically.