Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

The HashSet in the Hot Spot

DZone's Guide to

The HashSet in the Hot Spot

Here's a quick way to get some extra efficiency out of your PagerState.

· Database Zone
Free Resource

Learn how to move from MongoDB to Couchbase Server for consistent high performance in distributed environments at any scale.

The title of this post reminds me of a Bones episode. This blog post is actually from an internal mail made by Federico Lois, as part of bigger perf work.

image004

Here is the calling code, note that this is typically called many times, and _pageStates is a HashSet<PagerState>.

image002

The following change was made:

image003

And here are the results:

image001

That is 230% improvement! I can identify with the sentiment.

Want to deliver a whole new level of customer experience? Learn how to make your move from MongoDB to Couchbase Server.

Topics:
internal ,performance ,mail ,post ,purpose ,nature ,work ,distribution ,blog ,hot

Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}