RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 10:41 pm

All times are UTC





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: large xml files going to be a problem?
PostPosted: Thu Sep 21, 2006 5:34 pm 
Offline
RomRaider Donator
User avatar

Joined: Thu Mar 30, 2006 2:38 am
Posts: 5336
I'm finishing up an app (modified MDTurbo's DTCedit) to create CEL code fix definitions for all roms (32bit and 16bit) which is about 150 codes per revision. This will add about 50kb per revision to the current ecu def file, making it a lot larger. Will this cause any issues with RomRaider or slow it down quite a bit? It doesn't seem to slow it down opening one revision with all these codes.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 5:41 pm 
Offline
RomRaider Developer

Joined: Wed Jul 12, 2006 1:25 am
Posts: 1025
Depends. Are we using Sax or Dom to pull XML data out?

I know DOM uses tons more memory to parse an XML file. Speed shouldn't be an issue.

XPath queries might be something we should look into.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 6:22 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 4:33 pm
Posts: 2079
Location: Palo, IA
We're using DOM. Once the file is parsed, though, the object isn't referenced anymore. It won't affect speed as only necessary elements are parsed.

_________________
- Jared


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 16, 2006 1:55 pm 
Offline
Newbie

Joined: Sat Aug 26, 2006 12:22 pm
Posts: 74
qoncept wrote:
We're using DOM. Once the file is parsed, though, the object isn't referenced anymore. It won't affect speed as only necessary elements are parsed.


I've actually been playing with the ecu defs file lately.

Maybe it's not an issue in Java, but parsing a 4MB XML file isn't very speedy in Ruby. Between four and six seconds on a 1.6ghz box. It's a one-time hit, but it's kind of annoying.

Preliminary testing indicates that it'd be quicker if the defs were broken up. My suggestion for that:
A directory named ecu_defs. This directory would contain:
base_maps, a directory containing one file per 'real' base map (16BITBASE, 32BITBASE)
id_addresses, a file containing each distinct internalidstring address
base_map_list, a file containing each base map name
Subdirectories named for each entry in id_address which contain
one file per ecu def

The logic would be... When an ecu image is loaded, collect the data at each offset defined in id_addresses. For each resulting string, check the corresponding offset directory for a matching file name.

'Chained' base defs are easy enough to handle. Once you have a def picked out, follow the trail of base maps until you get to an entry that matches the name of a file in base_maps.

We could actually skip the id_addresses and base_map_list files by just getting a list of the files in base_maps and the ecu_defs directory.

This way we don't have to process eleventy billion xml elements just to find the one we want.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl