Skip to content

Conversation

@hero5512
Copy link
Contributor

@hero5512 hero5512 commented Nov 2, 2025

This commit reduces filtermaps memory allocation through two optimizations:

  1. Replace map[uint32]struct{} with bitset in matcher
    The indexes in this map are consecutive, so using a bitmap instead of a map can reduce memory allocations.
  2. Reuse rowMappingCache across map
    Moved rowMappingCache from local variable to mapRenderer struct field to reuse across renderings instead of creating a new one everytime.

Before optimize:
mem_before
After optimize:
mem_after

@rjl493456442
Copy link
Member

@zsfelfoldi Please take a look.

Given that the filtermap is under the refactoring, I will let zsolt decide if this change will be suitable in the new code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants