Ignore:
Timestamp:
Sep 23, 2016, 10:04:06 AM (3 years ago)
Author:
cito
Message:

Cache the namedtuple classes used for query result rows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/changelog.rst

    r893 r894  
    22=========
    33
    4 Version 5.0.3 (2016-09-21)
    5 --------------------------
    6 - It is now possible to use a custom array cast method for the pgdb module,
    7   e.g. pgdb.set_typecast('anyarray', lambda v, basecast: v) will cause arrays
    8   to be always returned as strings instead of lists.
     4Version 5.0.3 (2016-09-23)
     5--------------------------
     6- It is now possible to use a custom array cast function by changing
     7  the type caster for the 'anyarray' type.  For instance, by calling
     8  set_typecast('anyarray', lambda v, c: v) you can have arrays returned
     9  as strings instead of lists.  Note that in the pg module, you can also
     10  call set_array(False) in order to return arrays as strings.
     11- The namedtuple classes used for the rows of query results are now cached
     12  and reused internally, since creating namedtuples classes in Python is a
     13  somewhat expensive operation.  By default the cache has a size of 1024
     14  entries, but this can be changed with the set_row_factory_size() function.
     15  In certain cases this change can notably improve the performance.
    916
    1017Version 5.0.2 (2016-09-13)
Note: See TracChangeset for help on using the changeset viewer.