Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.

Large memory consumption #5

@ras254

Description

@ras254

Hi
I tried to unpack a large msdf file (about 500 Mb) and got large memory consumption (about 6-8 Gb).
I think what this because a new byte[] operation take place many times.

Can you made some changes like this:
Sector.cs - add function

       public void GetData(byte[] buffer, int offset, int length)
        {
            if (IsStreamed)
            {
                stream.Seek((long)size + (long)this.id * (long)size, SeekOrigin.Begin);
                stream.Read(buffer, offset, Math.Min(size, length));
            }
        }

And use it at the StreamView.cs (function int Read(byte[] buffer, int offset, int count)) instead of sectorChain[secIndex].GetData() function

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions