I just figured out that this is not a virtual DOM. You are touching DOM too much, both on creation and update! That's why you get your horrible performance!
One example is found in the velem prototype where you do an update. For children you are calling childNodes on a real DOM node!! An this happen on each update.
You take this childnodes and iterate over it - more expensive - BEFORE you update the node with it.
How many times you think you are touching the real DOM? Too many.
You should use the vdom object for this.
A lot of different places in your code you are doing this - touching DOM where you shouldn't.
I just compared with React. They are not doing it the same way as you are doing it!
To get the childNodes length in a virtual DOM, just count how many children there is on the vdom object without touching the DOM.
I just figured out that this is not a virtual DOM. You are touching DOM too much, both on creation and update! That's why you get your horrible performance!
One example is found in the velem prototype where you do an update. For children you are calling childNodes on a real DOM node!! An this happen on each update.
You take this childnodes and iterate over it - more expensive - BEFORE you update the node with it.
How many times you think you are touching the real DOM? Too many.
You should use the vdom object for this.
A lot of different places in your code you are doing this - touching DOM where you shouldn't.
I just compared with React. They are not doing it the same way as you are doing it!
To get the childNodes length in a virtual DOM, just count how many children there is on the vdom object without touching the DOM.