insidewhy
insidewhy
listen to Jimi Hendrix.
Have you ever grown a beard? I started hacking on this, I had changed quite a bit and added in most of the old features, but it's in the same...
Made another go at doing this properly: https://github.com/nuisanceofcats/the-party It's not bad.
Okay I applied an optimisation to reduce the number of traversals. Only sped up compilation by 20% though. I thought maybe the node "children" property cloning the children every time...
Okay changing children to return a reference rather than a copy shaves off 0.05s. Doesn't cause any failures though.
I modified the binary to time the length of various phases: `````` 28909: 0.040097868 - start 28909: 0.004540206 - begin rewrite 28909: 0.006303534 - create tree 28909: 0.009374042 - run...
So it seems it's the code compiliation step taking the most of the time. Maybe all the string concatenation? AST modification rather than reforming the tree out of source code...
If you check my branch "timing" I put the code there. Can open a pull request if you want.
I think.. I can apply all the hooks in a single traversal... by adjusting the compilation phase and ammending the visitor method slightly.
So for selectors with common parents.. it would compile them together and enable them then remove them from the type hash during traversal. I'll show you what I mean on...