Re: [ovs-dev] [PATCH v2] python: idl: Avoid pre-allocating column defaults

2021-11-29 Thread Ilya Maximets
On 11/5/21 15:13, Terry Wilson wrote: > Many python implementations pre-allocate space for multiple > objects in empty dicts and lists. Using a custom dict-like object > that only generates these objects when they are accessed can save > memory. > > On a fairly pathological case where the DB has

Re: [ovs-dev] [PATCH v2] python: idl: Avoid pre-allocating column defaults

2021-11-23 Thread Flavio Fernandes
LGTM! Acked-by: Flavio Fernandes > -- Forwarded message - > From: Terry Wilson mailto:twil...@redhat.com>> > Date: Fri, Nov 5, 2021 at 10:14 AM > Subject: [ovs-dev] [PATCH v2] python: idl: Avoid pre-allocating column > defaults > To: mai

Re: [ovs-dev] [PATCH v2] python: idl: Avoid pre-allocating column defaults

2021-11-05 Thread Dumitru Ceara
On 11/5/21 3:13 PM, Terry Wilson wrote: > Many python implementations pre-allocate space for multiple > objects in empty dicts and lists. Using a custom dict-like object > that only generates these objects when they are accessed can save > memory. > > On a fairly pathological case where the DB

[ovs-dev] [PATCH v2] python: idl: Avoid pre-allocating column defaults

2021-11-05 Thread Terry Wilson
Many python implementations pre-allocate space for multiple objects in empty dicts and lists. Using a custom dict-like object that only generates these objects when they are accessed can save memory. On a fairly pathological case where the DB has 1000 networks each with 100 ports, with only