You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now with how we connect to MySQL, we open a connection per transaction. It'd be wiser if I created a connection pooler which would hold N open connections and make requests on-demand.
This would cut down on SQL transaction time because we wouldn't have to worry about the overhead in opening a connection every transaction.
The text was updated successfully, but these errors were encountered:
The sql.DB interface implements a connection pool by itself, so I ought to either share that in the applicaionContext or allow each request to borrow a connection from the connection pool.
ADD:
- database/database.go:assertOpenConnection() now asserts a passed in
connection object is not nil, if it is nil then we will open a new
connection. This massively cuts down on opening/closing of connections
during runtime vs initialization.
CHANGE:
- reaper/reaper.go Updating for changes in `database/database.go`. See `ADD`
section.
- server/server.go Added a `dbPool` object to the `applicationContext` and
updated for changes in `database/database.go`.
Right now with how we connect to MySQL, we open a connection per transaction. It'd be wiser if I created a connection pooler which would hold
N
open connections and make requests on-demand.This would cut down on SQL transaction time because we wouldn't have to worry about the overhead in opening a connection every transaction.
The text was updated successfully, but these errors were encountered: