Conversation
… caching access patterns for the new HTMLELements class, hence the usage pattern is similar but we get proper caching without messing up the state
|
@rschwietzke at the moment i think about a different approach - do we really need that cache? Have hacked a bit to hopefully make the search for the elements a bit faster https://github.com/HtmlUnit/htmlunit-neko/commits/faster_elements/ - what do you think? |
|
Here are some quick results based on https://github.com/rschwietzke/htmlunit-benchmark/pull/new/HtmlELements-benchmark
Original HtmlUnit 4.16 and Neko 4.16rschwietzke HtmlUnit 4.16 and Neko 4.16 with #148 PRHtmlUnit 4.16 and Neko 4.16 with branch faster-elementsSo I would favor my solution, also because of little less memory per operation. Hope that your HtmlUnit and mine are not off by that much. |
|
If you like, you can prepare two branches of HtmlUnit which pulls in the different Nekos to ensure we talk about the same. But I already tried that when running and bulding on the test machine. |
|
By the way, my rework was not designed to be faster, just safer in usage and threading. The different runtime comes for free by accident. |
Addresses #148 but also requires an update to HtmlUnit. See the other pull request there.
I tried to keep
HTMLElementsas close to the original patterns for compatibility as possible, but I cannot guarantee it.