Skip to content

Ranges allocate 670 MB in 94 seconds of normal IDE usage in service.fs only #6047

Closed
@cartermp

Description

@cartermp

Ranges are a struct, so it's strange that it would show up so high in the GC stats:

image

Taking a look, this is mostly due to equality comparisons:

image

Range is compared all over the place with = and <>. This actually leads towards GenericEqualityIntrinsic, which causes boxing:

https://github.com/Microsoft/visualfsharp/blob/32251218913b82390b6b11e374ea5ac84c2c56ad/src/fsharp/FSharp.Core/prim-types.fs#L1539-L1540

And this leads to lots of heap allocations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions