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

Large memory consumption #5

Open
ras254 opened this issue Aug 4, 2017 · 0 comments
Open

Large memory consumption #5

ras254 opened this issue Aug 4, 2017 · 0 comments

Comments

@ras254
Copy link

ras254 commented Aug 4, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant