Skip to content

Unable to load nodes due to too much memory consumption. #239

@mwantia

Description

@mwantia

I am currently trying to create a mega client within Docker, but am unable to complete the execution of this method even after waiting for an hour.

public void CacheNodes()
{
    Console.WriteLine("Caching nodes...");
    lock (_lock)
    {
        IsRunning = true;
        if (_client.IsLoggedIn)
        {
            _nodes = _client.GetNodes();
            if ((Root = _nodes.Single(node => node.Type == NodeType.Root)) == null)
            {
                IsCompleted = false;
            }
            else
            {
                IsCompleted = true;
            }
        }
        IsRunning = false;
    }
    Console.WriteLine("Caching nodes completed.");
}

It works when I test everything on my PC, but only because Visual Studio is showing a memory usage of 5,2 GB under Diagnostic Tools.
This is obviously not a amount that I can just provide to an docker container which only job is to download files.

Are there any ways to avoid this kind of memory consumption?
Is there a reason why the amount is so high, even tho it only loads the metadata for each node?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions