[server] use a LifoQueue in _CnxSetPool
In postgresql, some cache is attached to the connection. Using a LifoQueue
(last-in, first-out) makes a few connections to get the most load which give
best performance.
--- a/cubicweb/server/repository.py Mon Mar 30 15:23:56 2020 +0200
+++ b/cubicweb/server/repository.py Mon Mar 30 15:30:02 2020 +0200
@@ -173,7 +173,7 @@
def __init__(self, source, size):
super().__init__(source)
self._cnxsets = []
- self._queue = queue.Queue()
+ self._queue = queue.LifoQueue()
for i in range(size):
self._queue.put_nowait(self._new_cnxset())