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


Groups > comp.lang.python > #62385

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

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'subject:file': 0.07; 'occasionally': 0.09; 'thread': 0.14; 'agree.': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'processes.': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.18; 'to:name:python-list@python.org': 0.22; 'header:User-Agent:1': 0.23; 'cheers,': 0.24; 'file.': 0.24; '---': 0.24; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'that.': 0.31; 'bad.': 0.31; 'crash': 0.31; 'obliged': 0.31; 'option.': 0.31; 'etc': 0.35; 'but': 0.35; 'himself': 0.36; 'received:com.au': 0.36; 'charset :us-ascii': 0.36; 'subject:?': 0.36; 'wrong': 0.37; 'performance': 0.37; 'received:211': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'most': 0.60; 'content-disposition:inline': 0.62; 'costs': 0.63; 'pick': 0.64; 'subject:more': 0.64; 'here': 0.66; 'between': 0.67; 'sharing': 0.69; 'integrity': 0.74; 'protect': 0.79; 'bang': 0.84; 'provisions.': 0.84; 'subject:read': 0.84; 'state.': 0.95
Date Thu, 19 Dec 2013 18:56:42 +1100
From Cameron Simpson <cs@zip.com.au>
To "python-list@python.org" <python-list@python.org>
Subject Re: Is it more CPU-efficient to read/write config file or read/write sqlite database?
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <CAPTjJmrwvK3PQHvvBb2Nr06kDuqEhJ+yO99mX3k83V=vLqrrxA@mail.gmail.com>
User-Agent Mutt/1.5.21 (2010-09-15)
References <CAPTjJmrwvK3PQHvvBb2Nr06kDuqEhJ+yO99mX3k83V=vLqrrxA@mail.gmail.com>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=AcBfY2YtO3UA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=8AHkEIZyAAAA:8 a=pQ66fiTqrssA:10 a=pGLkceISAAAA:8 a=KqYW9zOnXfutgHsWhTUA:9 a=CjuIK1q_8ugA:10 a=MSl-tDqOz04A:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4403.1387440986.18130.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387440986 news.xs4all.nl 2871 [2001:888:2000:d::a6]:40338
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62385

Show key headers only | View raw


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.

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

Churchill's Commentary on Man: Man will occasionally stumble over the truth,
but most of the time he will pick himself up and continue on.

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? Cameron Simpson <cs@zip.com.au> - 2013-12-19 18:56 +1100

csiph-web