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?
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
Unfilteredobject. 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 anUnfilteredobject?