Skip to content

StackOverflow when scheduling too many items #2

@siewfaihoy

Description

@siewfaihoy

In the TestHost, I am using DueSchedule, I made it to dispatch multiple items. When the number is small, e.g. 2000, it was okay. When the number was big, e.g. 30000, it breaks.

We have a requirement to schedule to at least 60000 items.

   public async Task<Activity> DownloadEachItem()
    {
        Console.WriteLine("Download Each Item");
        return Activity.Sequence(CreateItems());
    }

    IEnumerable<Activity> CreateItems(int count = 30000)
    {
        for (var i = 0; i < count; i++)
        {
            var id = i.ToString(); 

            yield return Activity.Sequence(
                Activity.Run<ApplicationDetails>(a => a.Download(id)),
                Activity.Run<ApplicationDetails>(a => a.Convert(id)),
                Activity.Run<ApplicationDetails>(a => a.Notify(id))
                );
        }
    }

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