<div dir="auto">The answer was to create a big regular expression pattern out of all the HAnim DEFs with the alternating symbol, |.  It’s way faster than any thing else I’ve tried.  Biggest regular expression I’ve ever written or generated.  This has other uses like keeping track of which body parts are valid, etc.  Perhaps something like this is already in X3DUOM or XML schema?  I may check.</div><div dir="auto"><br></div><div dir="auto">I’m still working on using weights from Blender and animations.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 14, 2023 at 8:10 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">I'm stumped for a while.  I need to talk to a teddy bear.<div><br></div><div>I'd like to prefix all the DEFs for my HAnimJoints, HAnimSites, and HAnimSegments and all references to them with a prefix, say "Senior_"</div><div><br></div><div>Right now, I loop through the file, pulling in all HAnim DEF values into a HashMap, mapped from old DEF value to new DEF value.  Then I examine each line, trying to substitute the  "word" or occurrence of an old DEF value to the new DEF value.  I have a little loop that goes through the whole hash map for each line.  It is extremely slow.</div><div><br></div><div>I have thought of storing patterns in the hash map, but I've not done that  before.</div><div><br></div><div>Perhaps I should code this up in Rust or C?  Does someone know a good native hash map implementation for  Rust/C/C++ or something as fast?</div><div><br></div><div>Thanks!</div></div><div dir="ltr"><div><br></div><div>John</div></div>
</blockquote></div></div>