Closed microl44 closed 1 year ago
Important to note is that 151 established connections are the maximum for the default XAMPP settings. Further testing will be required to determine if the hosting hardware can even come close to that amount of connections without burning.
Closed as the latest push (directly to main) implemented it. Didn't find any bugs after an exhaustingly 5 minutes of testing so we're probably fine. It's 4 in the morning, I'm going to bed and w/e happens happens.
As the number of PDO connections grow larger, so will the load time between pages when multiple users accesses the site at the same time. To combat this, a PDO connection pool can be implemented with the general idea of having a global array of pdo connections, where each pdo call fetches the next connection, if available. If no such connection is available, it should then create a new PDO connection.
Once the code is done with the connection, it should return it to the connection pool at the end of the list.
If the issue is deemed too easy, async PDO query functions can be looked into.