Skip to content

TextMetrics+FullTextLine.Dispose() gets slower over time until a GC #10199

Open
@seanhalliday

Description

@seanhalliday

I have working on some optimizations to some of our controls to make scrolling faster and I noticed that while scrolling it initially was fast but the more I used it, the more laggy it became. When I profiled with dotTrace it showed that FullTextLine.Dispose() was taking more time. If I force a GC.Collect I get speed back and FullTextLine.Dispose is fast again. Unfortunately this calls into PresentationNative.LoDisposeLine which is not open source so I am unable to determine why it gets slower.
Is there a workaround or a method I can call (even via reflection) that would trigger whatever GC.Collect is triggering?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions