Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First instance spikes with 300 MB memory usage #10

Open
Kaliumhexacyanoferrat opened this issue Apr 3, 2019 · 0 comments
Open

First instance spikes with 300 MB memory usage #10

Kaliumhexacyanoferrat opened this issue Apr 3, 2019 · 0 comments

Comments

@Kaliumhexacyanoferrat
Copy link

Consider the following test application (.NET Core):

using System;
using System.IO;

using BSL = BrotliSharpLib;
using System.IO.Compression;

namespace BrotliTest
{

    class Program
    {

        static void Main(string[] args)
        {
            using (var mem = new MemoryStream())
            {
                using (var brotli = new BSL.BrotliStream(mem, CompressionMode.Compress))
                {

                }
            }

            Console.ReadLine();
        }

    }

}

When executed, you will see a 300 MB process memory spike in Visual Studio's Diagnostics tool window. This only happens on first instantiation of a BrotliStream. Is there a way to improve memory management in this regard?

@Kaliumhexacyanoferrat Kaliumhexacyanoferrat changed the title First instances spikes with 300 MB memory usage First instance spikes with 300 MB memory usage Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant