Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62386

Re: Is it more CPU-efficient to read/write config file or read/write sqlite database?

References <CAPTjJmrwvK3PQHvvBb2Nr06kDuqEhJ+yO99mX3k83V=vLqrrxA@mail.gmail.com> <20131219075642.GA11967@cskk.homeip.net>
Date 2013-12-19 19:18 +1100
Subject Re: Is it more CPU-efficient to read/write config file or read/write sqlite database?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4404.1387441128.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Dec 19, 2013 at 6:56 PM, Cameron Simpson <cs@zip.com.au> wrote:
> On 18Dec2013 21:50, Chris Angelico <rosuav@gmail.com> wrote:
>> It's fundamentally about crash recovery, [...]
>> Databases protect against that. If you want that protection, use a
>> database. If you don't, use a file. There's nothing wrong with either
>> option.
>
> Look, broadly I agree. But this thread was about sharing access to
> configs etc between processes. And it segued into suggesting sqlite.
> Which is good and bad.
>
> My point here is that here we were discussing cooperative access
> to some shared state. And a "database" is tossed into the mix, with
> its -- for this purpose --- overkill data integrity provisions.
>
> So I feel obliged to point out the performance costs associated
> with using a sledgehammer to bang in a tack.

Fair enough. So the correct decision in this instance may well be: Use
a file, because you don't want a database.

On the flip side, maybe the data integrity guarantees *are* what you
want. Depends how often you're updating those files.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Is it more CPU-efficient to read/write config file or read/write sqlite database? Chris Angelico <rosuav@gmail.com> - 2013-12-19 19:18 +1100

csiph-web