Split QueueItem Into Different Types Of Queue Item #19

Closed
opened 2024-11-28 18:59:33 +00:00 by owner · 0 comments
Owner

Like, if I'm going to alleviate the GC pressure, then there is no reason to have one big class that can hold multiple different objects.

The only object here that is a struct is the Unfiltered object. Now what if we split this up into a UnfilteredQueueItem, FilteredQueueItem... and so on? Because if we did that, then that would heavily lessen the pressure. Because there is no reason to create a class, when all I have to insert into the database is an Unfiltered object?

public class QueueItem
{
    public Unfiltered Unfiltered { get; init; }
    public Filtered? Filtered { get; init; }
    public ScannerResumeObject? ResumeObject { get; init; }
    public Operations Operations { get; init; }
    public DbType DbType { get; init; }
}
Like, if I'm going to alleviate the GC pressure, then there is no reason to have one big class that can hold multiple different objects. The only object here that is a struct is the `Unfiltered` object. Now what if we split this up into a UnfilteredQueueItem, FilteredQueueItem... and so on? Because if we did that, then that would heavily lessen the pressure. Because there is no reason to create a class, when all I have to insert into the database is an `Unfiltered` object? ```cs public class QueueItem { public Unfiltered Unfiltered { get; init; } public Filtered? Filtered { get; init; } public ScannerResumeObject? ResumeObject { get; init; } public Operations Operations { get; init; } public DbType DbType { get; init; } } ```
owner added this to the Minimize GC Pressure milestone 2024-11-28 18:59:33 +00:00
owner added the
enhancement
label 2024-11-28 18:59:33 +00:00
owner self-assigned this 2024-11-28 18:59:33 +00:00
owner added reference SplitUpQueueItem 2024-11-29 10:08:11 +00:00
owner closed this issue 2024-11-29 11:59:21 +00:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: owner/RSE#19
No description provided.