[gambit-list] Speed on XML-parsing

Hans Petter Egesund petter.egesund at gmail.com
Sat Aug 16 05:56:38 EDT 2008


Guess I was lucky when I installed ssax, I just had to add a couple  
of parameters to the makefile.

I will try to slurp the file, and then read from a string-port, as a  
first try. Thanks.

Petter


Den 16. aug. 2008 kl. 08.32 skrev David Rush:

> On Sat, Aug 16, 2008 at 1:45 AM, Bradley Lucier  
> <lucier at math.purdue.edu> wrote:
>> On Aug 15, 2008, at 7:08 PM, Hans Petter Egesund wrote:
>>> Clues on this one?
>
>> If you follow the thread spread between subthreads starting...
>> you'll see that IO using read-char and write-char is slow; that's
>> hard to fix.
>
> Yes. I've had this problem with a number of schemes. Depending on the
> size of your file, reading the whole thing as a string and *then*
> running the rest of your program on a string-port (instead of a plain
> input-port) can give you a fair bit of speed increase. There are
> deeper hacks you can use to avoid allocator churn while reading the
> file, but these can be very dependent on the specfic implementation.
>
> Another thing I did on one project was develop a preprocessor which
> converted my XML files to SXML format. Since READ is highly optimized
> in most Scheme readers it made the actual data processing go very
> fast. This had the added advantage that I was able to break my
> dependency on SSAX.
>
> Just some thoughts. Remember, memory is cheap these days.
>
> david
> -- 
> GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt




More information about the Gambit-list mailing list