Re: generic options for explain

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: generic options for explain
Дата
Msg-id 87y6sjzy0i.fsf@hi-media-techno.com
обсуждение исходный текст
Ответ на Re: generic options for explain  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Hi,

Peter Eisentraut <peter_e@gmx.net> writes:
> I was actually looking for a C library for JSON (json type for PostgreSQL; you 
> know it is coming :-) ), but only found a library tied to glib, which, 
> considering the experience with libxml, did not excite me.  If someone knows 
> of a different, small, and independent JSON library for C, I would like to 
> hear about it.

Looking at http://json.org/, it seems this particular project could fit:
 http://lloyd.github.com/yajl/
 Yet Another JSON Library. YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a small
validatingJSON generator. YAJL is released under the BSD license.
 
 ...
 It's all ANSI C. It's been successfully compiled on debian linux, OSX 10.4 i386 & ppc, OSX 10.5 i386, winXP, FreeBSD
4.10,FreeBSD 6.1 amd64, FreeBSD 7 i386, and windows vista. More platforms and binaries as time permits. 
 
 ...
 A second motivation for writing YAJL, was that many available free JSON parsers fall over on large or complex inputs.
YAJLis careful to minimize memory copying and input re-scanning when possible. The result is a parser that should be
fastenough for most applications or tunable for any application. On my mac pro (2.66 ghz) it takes 1s to verify a 60meg
jsonfile. Minimizing that same file with json_reformat takes 4s. 
 
 Largely because YAJL deals with streams, it's possible to parse JSON in low memory environments. Oftentimes with other
parsersan application must hold both the input text and the memory representation of the tree in memory at one time.
WithYAJL you can incrementally read the input stream and hold only the in memory representation. Or for filtering or
validationtasks, it's not required to hold the entire input text in memory. 
 


Hope this helps, regards,
-- 
dim


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL Developer meeting minutes up
Следующее
От: Pavel Stehule
Дата:
Сообщение: problem with memory