Skip to content

Support for multithreading #362

@AlizerUncaged

Description

@AlizerUncaged

I have the following code below to seed a MongoDb instance of 500K+ objects

        List<Member> members = new();

        for (int i = 0; i < 500000; i++)
        {
            var data = $"{_random.Next()}";
            members.Add(new Member()
            {
                Email = $"{data}@random.com",
            });
        }

        _applicationMongoDbContext.Members.AddRange(members);

        await _applicationMongoDbContext.SaveChangesAsync();

Creating the objects takes a few milliseconds but the await _applicationMongoDbContext.SaveChangesAsync() method takes around 20 minutes I checked my VPS and found out it seems to be only utilizing the first core

image

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