-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Htmlunit tuning #715
Htmlunit tuning #715
Conversation
…n to the thread that created it, removed.
…nized, but churns too much memory when we need a fail-safe iterator
…d sychronized, but churns too much memory when we need a fail-safe iterator" This reverts commit fb8355b1c0b32a43b12b425f492f20898e8b4b1f.
…r lists should not be insanely large and hence we can remove by iterating
… index based structure later, less memory when in use, based on FashHashMap with futher footprint reduction
…by default, only in case we don't find anything, we go the lowercasing and comparision route
…cially when also shared, is more expensive than a potential lower casing operation which in most case might not be needed at all.
…hen asking contains or get due to the more likely cache misses when jumping into an array of hashes
…p content beyond the original position
private static final Map<String, String> CamelizeCache_ = new HashMap<>(); | ||
private static final Map<String, String> RootLowercaseCache_ = new HashMap<>(); | ||
private static final Map<String, String> CamelizeCache_ = new ConcurrentHashMap<>(); | ||
private static final Map<String, String> RootLowercaseCache_ = new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RootLowercaseCache_ seems to be no longer used - does having this case makes no sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found the answer in the commit comment
|
||
import java.util.Random; | ||
|
||
public final class RandomUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add author
https://jenkins.wetator.org/job/htmlunit/view/change-requests/job/PR-715/ the failing tests are my ones - i'm still in the middle of a huge refactoring |
https://jenkins.wetator.org/job/HtmlUnit%20-%20Library%20Tests/view/change-requests/job/PR-715/ lets see if they also pass |
@shapiroronny is this something you are also interested in? Will be great to see if all the hard work from @rschwietzke has some impact for your use case |
Hopefully yes. We're disabling javascript for our case and don't do any navigations and very little DOM mutation so not sure which flows are optimized. If initial parsing is faster, that's huge for us. In any case, we haven't bumped in a while so we're happy upgrading in steps in case this was planned to go in the next major version with Computed Css fixes. |
Great; that was my understanding of your use case and of @rschwietzke 's goal. |
HtmlUnit tuning regarding speed and memory. Current success, more on the memory side.
Please run the full test program, there might be something hidden. The small one looked ok.
E-commerce retailer website
NEW (JDK 17)
OLD (JDK 17)
XC Homepage
NEW (JDK 17)
OLD (JDK 17)