Skip to content

Entries in widthCache never removed #305

@pontuslu

Description

@pontuslu

Over time when logging table after table I've noticed a memory build up that likely is from the items in the widthCache map not having a expiration.

Showing top 10 nodes out of 40
      flat  flat%   sum%        cum   cum%
   97.50MB 63.78% 63.78%    97.50MB 63.78%  ...
   23.39MB 15.30% 79.08%    23.39MB 15.30%  github.com/olekukonko/tablewriter/pkg/twwidth.Width
   13.45MB  8.80% 87.87%    13.95MB  9.12%  ...
    5.01MB  3.28% 91.15%     5.01MB  3.28%  ...

A workaround is to toggle the SetEastAsian occasionally.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions