dynamic allocation file buffer

Aaron "Castironpi" Brady castironpi at gmail.com
Fri Sep 12 08:53:02 CEST 2008


On Sep 12, 1:30 am, Steven D'Aprano
<ste... at REMOVE.THIS.cybersource.com.au> wrote:
> On Thu, 11 Sep 2008 22:40:01 -0700, Dennis Lee Bieber wrote:
> > On 12 Sep 2008 03:37:51 GMT, Steven D'Aprano
> > <ste... at REMOVE.THIS.cybersource.com.au> declaimed the following in
> > comp.lang.python:
>
> >> I'm pretty sure you're wrong. XML can be used for serialization, but
> >> that doesn't mean it is only sequential data. XML is suitable for
> >> hierarchical data too. To quote Wikipedia:
>
> >    There is a difference between the format of the data content, and
> > the processing of that data... Regardless of the content, one
> > essentially has to process the XML /file/ sequentially, and translate
> > into an in-memory model that allows for accessing said data. To reach
> > the nth subelement of the mth element requires reading all 1..m-1
> > elements, followed by all 1..n-1 subelements in m. Modifying any element
> > requires rewriting the entire file.
>
> Which is why I previously said that XML was not well suited for random
> access.
>
> I think we're starting to be sucked into a vortex of obtuse and opaque
> communication. We agree that XML can store hierarchical data, and that it
> has to be read and written sequentially, and that whatever the merits of
> castironpi's software, his original use-case of random access to a 4GB
> XML file isn't workable. Yes?
>
> --
> Steven

By 'isn't workable' do you mean, "no one ever uses 4GB of XML", or "no
one ever uses 4GB or hierarchical data period"?



More information about the Python-list mailing list