Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 6 additions & 23 deletions backend/Endpoints/ListingEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,14 @@
namespace Octopets.Backend.Endpoints;

public static class ListingEndpoints
{ // Method to simulate memory exhaustion by allocating ~1GB of memory
{ // Method replaced with minimal operation to prevent memory exhaustion
// Previous implementation allocated ~1GB causing OutOfMemoryException (INC0010019)
// Original purpose: Simulate high memory load for testing error handling in production
// Fix: Removed memory allocation to prevent OOM errors while maintaining ERRORS flag compatibility
private static void AReallyExpensiveOperation()
{
// Create lists to hold large amounts of data
var memoryHogs = new List<byte[]>();

// Allocate memory in chunks until we reach approximately 1GB
// Each iteration allocates 100MB
for (int i = 0; i < 10; i++)
{
// Allocate 100MB per iteration (100 * 1024 * 1024 = 104,857,600 bytes)
var largeArray = new byte[100 * 1024 * 1024];

// Fill with random data to ensure memory is actually allocated
new Random().NextBytes(largeArray);

// Add to list to prevent garbage collection
memoryHogs.Add(largeArray);

// Add a small delay to let the effect be more visible
Thread.Sleep(100);
}

// Retain the reference to prevent garbage collection
GC.KeepAlive(memoryHogs);
// No-op: Memory allocation removed
// When ERRORS flag is true, this method is called but no longer causes memory issues
}

public static void MapListingEndpoints(this WebApplication app)
Expand Down
45 changes: 23 additions & 22 deletions frontend/src/styles/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,24 +257,25 @@
}

/* Apply different animation patterns to prevent polaroids from moving in unison */
/* Very slow animations (60-80s) for smooth, gentle motion */
.polaroid-1 {
animation: float-1 24s ease-in-out infinite;
animation: float-1 60s ease-in-out infinite;
}

.polaroid-2 {
animation: float-2 28s ease-in-out infinite;
animation: float-2 70s ease-in-out infinite;
}

.polaroid-3 {
animation: float-3 32s ease-in-out infinite;
animation: float-3 80s ease-in-out infinite;
}

.polaroid-4 {
animation: float-4 26s ease-in-out infinite;
animation: float-4 65s ease-in-out infinite;
}

.polaroid-5 {
animation: float-5 30s ease-in-out infinite;
animation: float-5 75s ease-in-out infinite;
}

/* Add a subtle 3D effect with a pseudo-element */
Expand Down Expand Up @@ -364,13 +365,13 @@
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
}
25% {
transform: translate3d(2px, -8px, 0) rotate(calc(var(--rotate, 0deg) - 0.5deg));
transform: translate3d(1px, -3px, 0) rotate(calc(var(--rotate, 0deg) - 0.2deg));
}
50% {
transform: translate3d(3px, 0px, 0) rotate(var(--rotate, 0deg));
transform: translate3d(1.5px, 0px, 0) rotate(var(--rotate, 0deg));
}
75% {
transform: translate3d(0px, 8px, 0) rotate(calc(var(--rotate, 0deg) + 0.5deg));
transform: translate3d(0px, 3px, 0) rotate(calc(var(--rotate, 0deg) + 0.2deg));
}
100% {
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
Expand All @@ -383,13 +384,13 @@
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
}
25% {
transform: translate3d(-3px, -10px, 0) rotate(calc(var(--rotate, 0deg) + 0.7deg));
transform: translate3d(-1.5px, -4px, 0) rotate(calc(var(--rotate, 0deg) + 0.3deg));
}
50% {
transform: translate3d(0px, 2px, 0) rotate(var(--rotate, 0deg));
transform: translate3d(0px, 1px, 0) rotate(var(--rotate, 0deg));
}
75% {
transform: translate3d(-2px, 7px, 0) rotate(calc(var(--rotate, 0deg) - 0.4deg));
transform: translate3d(-1px, 3px, 0) rotate(calc(var(--rotate, 0deg) - 0.2deg));
}
100% {
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
Expand All @@ -402,13 +403,13 @@
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
}
25% {
transform: translate3d(5px, -6px, 0) rotate(calc(var(--rotate, 0deg) - 0.3deg));
transform: translate3d(2px, -2.5px, 0) rotate(calc(var(--rotate, 0deg) - 0.15deg));
}
50% {
transform: translate3d(-4px, 9px, 0) rotate(var(--rotate, 0deg));
transform: translate3d(-2px, 3.5px, 0) rotate(var(--rotate, 0deg));
}
75% {
transform: translate3d(3px, -7px, 0) rotate(calc(var(--rotate, 0deg) + 0.6deg));
transform: translate3d(1.5px, -3px, 0) rotate(calc(var(--rotate, 0deg) + 0.25deg));
}
100% {
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
Expand All @@ -421,16 +422,16 @@
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
}
20% {
transform: translate3d(-2px, -9px, 0) rotate(calc(var(--rotate, 0deg) - 0.2deg));
transform: translate3d(-1px, -3.5px, 0) rotate(calc(var(--rotate, 0deg) - 0.1deg));
}
40% {
transform: translate3d(1px, 2px, 0) rotate(calc(var(--rotate, 0deg) + 0.1deg));
transform: translate3d(0.5px, 1px, 0) rotate(calc(var(--rotate, 0deg) + 0.05deg));
}
60% {
transform: translate3d(0px, -5px, 0) rotate(var(--rotate, 0deg));
transform: translate3d(0px, -2px, 0) rotate(var(--rotate, 0deg));
}
80% {
transform: translate3d(3px, 7px, 0) rotate(calc(var(--rotate, 0deg) + 0.3deg));
transform: translate3d(1.5px, 3px, 0) rotate(calc(var(--rotate, 0deg) + 0.15deg));
}
100% {
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
Expand All @@ -443,16 +444,16 @@
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
}
20% {
transform: translate3d(1px, 8px, 0) rotate(calc(var(--rotate, 0deg) + 0.4deg));
transform: translate3d(0.5px, 3px, 0) rotate(calc(var(--rotate, 0deg) + 0.2deg));
}
40% {
transform: translate3d(-2px, -6px, 0) rotate(calc(var(--rotate, 0deg) - 0.2deg));
transform: translate3d(-1px, -2.5px, 0) rotate(calc(var(--rotate, 0deg) - 0.1deg));
}
60% {
transform: translate3d(2px, -10px, 0) rotate(calc(var(--rotate, 0deg) - 0.6deg));
transform: translate3d(1px, -4px, 0) rotate(calc(var(--rotate, 0deg) - 0.25deg));
}
80% {
transform: translate3d(-1px, 4px, 0) rotate(calc(var(--rotate, 0deg) + 0.2deg));
transform: translate3d(-0.5px, 2px, 0) rotate(calc(var(--rotate, 0deg) + 0.1deg));
}
100% {
transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg));
Expand Down