Hacker Newsnew | past | comments | ask | show | jobs | submit | johnou's commentslogin

In this case I feel changing the LRUCache to support generics was an integral part of the changeset to prevent possible regressions with cache usage (as I was changing the cache key from String to another type). Without it, it would be possible to use the incorrect object type in one of the many code paths, by adding generics we benefit from compile time checks.


But then you are stuck with the maintenance burden..


Often getting that CLA signed involves getting at least the legal department involved, especially in larger, more corporate organizations. In those cases, indefinitely maintaining a patch may sound like a good alternative.


I get paid for that


It's also about giving back to the open source community.


Well that I believe in. It's also about having a github of green.


I added generics to ensure type safety, it is not technically diamond brackets (they came in jdk7 but mysql connector targets jdk6).


I didn't benchmark the difference between cache usage with precalculating the hash code in a constructor vs calculation in the hash code itself but string concatenation then taking the hash code of that was the real performance killer.


The link is right down the bottom but the GitHub page also contains the benchmark code and results which seemed more interesting https://bugs.mysql.com/bug.php?id=88021


Hey johnou, thanks I saw this, my comment originally had been a response to https://news.ycombinator.com/item?id=15449672, which I interpreted as referring to a different bug, and was then moved and edited by an admin ... anyways thanks for your contribution and my colleagues will review and probably (as said: I don't know enough Java and thus can't judge it) apply it :)


I'd appreciate it if you could nag one of your colleagues to pick it up ;)


There is no need to nag me. :) We always welcome contributions, especially those like this one. Thanks!


dang is the administrator of this site, and his comment was referring to the submission title on this site, which he changed.


And 250% throughput increase with their cache when using their compound cache key which is not strictly related to server-side prepared statements.


Thanks for the tip!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: