View Full Version : Any 'c' programmers out there?
I'm a bit rusty on 'c' but am looking to try to do some xml parsing in 'C' which would convert either into a flat file or into mysql. All using the expat module..
Thought I'd ask on the offchance..
Bok
Digital Parasite
06-13-2007, 04:39 PM
I'm a C programmer but I have never used expat before. Is there something specific you are having problems with?
Basically the time it's taking for my perl script to parse the boinc xml files and insert the raw data into mysql.
Looking at some benchmarks, C parsers are way quicker, so I thought it might be useful to try one..
Of course it may well be the mysql pieces which are bogging it all down. I'm also looking into how to determine that and what can be down to increase speed..
Bok
Digital Parasite
06-15-2007, 01:02 PM
Is there any way to time your perl parsing code? So like print a timestamp at the beginning and end or do the calc yourself? That way you can see how long the the parsing took and compare that to the total time for the parse+mysql insert to see which is hogging the most. If the perl code is taking up only a small amount of time, then it might not be worth trying to use the C parser.
possibly. I do have timing statements throughout the script, but as the sql is done on every parse, it's difficult. I'll see if I can do some microtime calls and surround each step, adding up as I go along..
Bok :cheers:
Digital Parasite
06-18-2007, 12:41 PM
If you can time and add up the parsing, and also the sql calls, you can get both the SQL time and the parsing time. If the SQL time is huge compared to parsing, you should probably concentrating on optimizing that (which I can't really help you with). Otherwise switching to the C parser might help.
Powered by vBulletin® Version 4.2.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.