AsherGlick / Burrito

An overlay tool for Guild Wars 2 that works on linux
GNU General Public License v2.0
75 stars 18 forks source link

Parseable Overlays #269

Closed AsherGlick closed 5 months ago

AsherGlick commented 5 months ago

This changes how we handle defaults so that we can parse an entire XML node normally before needing to use any of its attributes to determine what default values that node should have.

This comes with a slight performance impact:

~668ms to run parsexml in the old system on a large marker pack ~680ms to run parsexml in the new system on the same large marker pack

The slowdown is likely do to a combination of:

But the tradeoffs are worth it, especially because those performance hits can probably be optimized away in the future.

This overlay/underlay system will allow us to get simpler fine grain control over each field. We no longer need to do a search for a particular field, such as category's "name" field, we can just parse the whole category node using the normal attribute parsing tech and then access the value from a member variable. EG: We were previously looking for just the "name" attribute, but now we can look for any xml tag that we have associated with the 'name' field, such as 'bh-name'. All without adding custom logic to the parser.