Sinistralis-DOS2-Mods / StatLib

A library for building a stat editor for Divinity Original Sin 2 with scripted stat support
MIT License
1 stars 1 forks source link

Clean up XMLWriter #3

Open Mike-Sinistralis opened 6 years ago

Mike-Sinistralis commented 6 years ago

Right now the XMLWriter is hilariously bad. I have to loop over all skills twice to re-format them (see the format modifier), and then I loop over them a third time when writing the XML. There's no reason for any of this, I should just be generating the XML after processing each skill and storing it, then sending it to the XML writer to be written to disk.

This would be a huge performance improvement, although I havnt hit bottlenecks yet.

Xehanort88 commented 6 years ago

You mean in-game? Such a thing would cause massive performance improvement even in-game?

Il 05 Nov 2017 01:04, "Michael Zimmerman" notifications@github.com ha scritto:

Right now the XMLWriter is hilariously bad. I have to loop over all skills twice to re-format them (see the format modifier), and then I loop over them a third time when writing the XML. There's no reason for any of this, I should just be generating the XML after processing each skill and storing it, then sending it to the XML writer to be written to disk.

This would be a huge performance improvement, although I havnt hit bottlenecks yet.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Sinistralis-DOS2-Mods/SkillGenerator/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/Ac-eFrqAK9zO3S6ORAsQ_xE3_jP6oJdzks5szPuOgaJpZM4QSNOk .

Mike-Sinistralis commented 6 years ago

Oh, no. I mean for the SkillGenerator. I am doing a O(3n) operation which could easily be made O(n). This will probably only be a big deal once I get to Foci since that will exponentially increase the number of skills being generated.