-
Notifications
You must be signed in to change notification settings - Fork 159
ArticleTextExtractor.getNodes() questions #3
Comments
Regarding 1: yes, you are right. But it wouldn't be a difference in terms of CPU or memory. As HashSet uses even more memory than HashMap and calculating the hashCode would still be done under the hood from hashset ... but when I think about it then this could be improved using an IdentityHashMap. I'll see if I can get all tests passing Regarding 2: Thanks! Really not necessary. |
The linked hashmap cannot be replaced by an identity hashmap as the order of insertion is important. |
Is this now better understandable? |
Yes, definitely clearer but I'm still not convinced a |
Yeah, ok. I'll see if it would have significant perf or memory differences. BTW: hashset is implemented via hashmap ... |
karussell#3) Fixed ConcurrentModificationException in removeDisallowedAttributes.
Not an issue as such, a few questions.
Why in ArticleTextExtractor.getNodes() do you:
Map
, generate ahashCode
and then only return the map values? Wouldn't aSet
do the same job?The text was updated successfully, but these errors were encountered: