[Haskell-cafe] Announcing postgresql-libpq-0.8.2.3
leon.p.smith at gmail.com
Tue Jul 9 03:03:09 CEST 2013
I just fixed a fairly serious performance problem with postgresql-libpq's
binding to PQescapeStringConn; in was exhibiting a non-linear slowdown
when more strings are escaped and retained.
If you are using postgresql-libpq's escapeStringConn, or a library that
uses it (e.g. postgresql-simple, or persistent-postgresql), I do
recommend upgrading. You may or may not see a performance improvement,
depending on your particular use case, but if you do it can be quite
It's not entirely clear to me what the root cause really is, but it
certainly appears as though it's related to the (direct) use of
mallocBytes, which was replaced with (indirect) calls to
mallocForeignPtrBytes / mallocPlainForeignPtrBytes (through the bytestring
package). In this case, it resulted in an asymptotic improvement in time
complexity of some algorithms.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe