Skip to content

Performance: merge prerendered layers #216

@parasyte

Description

@parasyte

I can see this being a pretty big win for large maps with lots of layers. Most of the time, a map is entirely static... There might be a few parallax layers, and maybe an object layer sandwiched between two tile layers, etc. But there are cases where we could (and should!) merge static tile layers when pre-rendering is enabled.

One of the reasons for moving to the "dynamic rendering" method in 0.9.4 was to reduce memory cost. Pre-rendered layers have very high memory consumption with a large map, but memory usage is doubled when there are two layers in the map, and _quadrupled_ with four layers, etc. If we could determine at parse-time which layers can be merged into a single canvas, then we can benefit from the improved speed offered by the pre-render feature, as well as reducing the memory footprint AND overall drawing time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions