Reduce memory allocation while rendering labels

Description

A quick check with a profiler showed a couple of places that allocate memory, and easy to fix:

  • Visiting the label quadtree to collect all intersecting labels, while only one is really needed

  • Pattern (regex) being computed on the fly over and over as opposed to pre-calculated

Environment

None

Assignee

Andrea Aime

Reporter

Andrea Aime

Triage

None

Components

Fix versions

Priority

Medium
Configure