Cache question/bug report?

jda jda at his.com
Wed Jul 16 08:41:10 CDT 2003


>
>  >
>>  By an order of magnitude (tenfold) or more! A 60 MB database takes a
>>  *loooong* time to export/import with XML (I stopped timing it after 1
>>  hr) -- it takes about 5 minutes for my code.
>
>Aha, so you say about XML import. Export.
>Hmm, so our XML parser is not best?
>
>Can I ask, How long take our EXPORT?
>Is is also slower of your code ?
>Export I have write self so I hope it will faster of your :-)
>XML parser was on EXPAT...
>

Well, it's been a while since I tried this with XML, but I'd be 
shocked if my export isn't faster. Not because my code is any better 
(it's not), but because it is so much simpler. You have to parse the 
data, which takes time, and output a *lot* more text due to the XML 
field tags. I, OTOH, just dump out each field in each record to a 
binary file -- the only processing I do is to put a Long (at the 
beginning of each field) that contains the length of that field. So 
when I read it in, I can grab the data in chunks (and I don't have to 
test for an end-of-field condition). So again, for my export of a 60 
MB db, it takes approximately 2 minutes, which I think is pretty fast 
(V4RB, OS X, 1 GHz iMac).


>Very bad...
>Then I only can recommend open/close db after e.g. 10,000 records.
>
>Jon, if there is workaround for now, I'd prefer do not spend time on this
>problem. In 2.0 we have totally new cache...
>

I understand. So far it seems to be a rare occurrence, and I have a 
workaround. Hopefully it will not be an issue in 2.0.

Thanks Ruslan,

Jon


More information about the Valentina mailing list