road0001 / as3isolib

Automatically exported from code.google.com/p/as3isolib
0 stars 0 forks source link

getChildByID is slow (has O(n) complexity) #48

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Node.as getChildByID is dramatically slow. It has O(n) complexity.

What is the expected output? What do you see instead?

Node::addChildAt expects to has O(1) complexity, but it used getChildByID 
internal.

What version of the product are you using? On what operating system?

as3isolib.v1.core

Please provide any additional information below.

If it really NEEDS to check children ids, it's better to make support 
dictionary in parallel to childrenArray. Sample diff provided.

Original issue reported on code.google.com by maxim.ga...@gmail.com on 4 Nov 2012 at 1:35

Attachments: