[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] New RPM libezxml



On Wed, Jun 16, 2010 at 7:40 AM, m0n0 <ole@monochrom.net> wrote:
>
> Am Dienstag, den 15.06.2010, 20:35 +0200 schrieb Eero Tamminen
>
>>
>> IMHO INI style configuration files are nicer.  Less code needed for
>> parsing,
>> it's easier & faster to read, file size is smaller and like XML, it's
> kind
>> of a standard.
>
> Of course, that's true... but sometimes you will need XML parsing /
> writing (btw. I tested writing with ezxml and it works fine, ( I also
> tested for memory leaks) )
>
>>I think XML strengths are elsewhere (complicated /
>> arbitrarary data structures), but JSON[1] is partially replacing XML in
>> those areas as it's more lightweight...
>
> Is it really more lightweigt? How would you access JSON from C? I think
> this doesn't really make much difference. At least, when accessed from C.
> In JavaScript, JSON is nice to use. I think it's really better to use JSON
> for Object serialization / de-serialization than XML. It's a no brainer to
> create JAvaScript Objects from JSON. I believe creating JavaScript objects
> from XML involves a lot more code...
>
> Greets,
> Ole
>

It depends entirely on what the contents on any INI/XML config need to
be, and how or weather they need to be manipulated

each has its own strengths and weaknesses, its not just about personal
preference, but application and end user usability too

BTW some of the default KDE skins use XML format config files, as do
some of the widget and interface config (just a general FYI)

XML management does tend to be a bit bloated, so this library is a
nice change (20k all up)

I have to points:
1) this library would suit the creation of RSC binary replacements in
CVS as discussed around Christmas
2) for large files this library uses mmap:
""
Loads the entire XML document into memory at once and does not allow
for documents to be passed in a chunk at a time. Large XML files can
still be handled though through ezxml_parse_file() and
ezxml_parse_fd(), which use mmap to map the file to a virtual address
space and rely on the virtual memory system to page in data as needed.
""

So I have 2 questions:
a) We dont use "nmap/mmap" yet do we (due to MiNT lacking a virtual
memory manager)?
b) Ole, have you tested large xml files yet, or used the above
mentioned functions?

Thanks for the package port Ole

Cheers

Paul