Seems I ain't so stupid after all ... I just updated the function and
got from 1.65 seconds to 0.29 seconds!!! Yay for super big differences
in speed. Here's the updated code for the haXe version - should be
fine in the Flash version too.

I just keep a Dictionary to know what I've got. So much faster than
trying to do a lookup in an array. I think this might only work for
the Flash target at the moment (not like you Flash kids will care) but
I'm pretty stoked!

The only problem is that it seems to speed things up for parsing, but
makes displaying 6 times slower when playing your animation (or
something like that?!) Can anyone explain it?

----------------------------------------------------------

        public function addSkinController(skinController:SkinController):Void
        {
                if (_skinControllers.indexOf(skinController) != -1)
                        return;

                _skinControllers.push(skinController);

                var d:flash.utils.TypedDictionary<SkinVertex, Bool> = new
flash.utils.TypedDictionary(true);

                for (_skinVertex in skinController.skinVertices) {
                        if (!d.exists(_skinVertex)){
                                _skinVertices.push(_skinVertex);
                                d.set(_skinVertex, true);
                        }
                }
        }

----------------------------------------------------------

Reply via email to