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.
In #9213, we factored out glyph management from the GlyphAtlas into its own class called GlyphManager. Previously, glyphs were stored and associated with a style, which meant that setting a new style also removed all cached glyphs. This isn't true anymore after #9213, since the GlyphManager is now owned by the Renderer::Impl, which persists across styles changes.
GlyphManager only ever has Glyphs/PBFs added to it, never removed, including glyphs from previously loaded styles that aren't used anymore. We should add an eviction strategy for glyphs that are unused so that they don't stick around forever in long-lived Map objects.
@jfirebaugh thinks that this could be fairly straightforward: promote style::Parser::fontStacks to a more general location, and then in Renderer::Impl::render, remove any unused font stacks from GlyphManager when the layer diff is non-empty.
In #9213, we factored out glyph management from the
GlyphAtlasinto its own class calledGlyphManager. Previously, glyphs were stored and associated with a style, which meant that setting a new style also removed all cached glyphs. This isn't true anymore after #9213, since the GlyphManager is now owned by theRenderer::Impl, which persists across styles changes.GlyphManageronly ever has Glyphs/PBFs added to it, never removed, including glyphs from previously loaded styles that aren't used anymore. We should add an eviction strategy for glyphs that are unused so that they don't stick around forever in long-livedMapobjects.@jfirebaugh thinks that this could be fairly straightforward: promote
style::Parser::fontStacksto a more general location, and then inRenderer::Impl::render, remove any unused font stacks fromGlyphManagerwhen the layer diff is non-empty.