|
|
|
Back to newsletter 218 contents
In November and December I chose the 8 top tips of 2018 - absolute top quality, all of them. There were a few other tips that were really good but didn't make into the top 8, I guess you could call them "honourable mention" tips. I'll cover those this month, as they are worth pointing out.
The first tip relates to handling data, pointing out that parsing and formatting is expensive and we do it a lot, in many cases over 90% and often even over 99% of processing time is spent in these activities. So try and avoid conversions, or target minimizing them.
A related tip is to minimize the data you need to handle - send deltas or relevant data subsets rather than all the data to reduce the load on the network and on conversions.
And staying related, the strategies to deal with slow consumers of that data are: drop data (routers do this); block (slows processing); buffer (but this is limited, only handles bursty traffic otherwise need to do one of the other strategies too); backpressure (tell the producer to send more slowly); aggregate in the producer; drop the connection.
Finally, a lovely tip on understanding how to pick the right executor: a fixed size thread pool (sized to the available cores) is appropriate for computationally expensive tasks; a variable sized pool is appropriate for tasks that are short or block a lot; a ForkJoinPool is appropriate for computationally expensive tasks that can be decomposed into subtasks.
Now on to this month's tips, tools, news, articles, and talks from our extensive community. And of course the tips from this month's articles and talks, as ever are extracted into this month's tips page.
Java performance tuning related news.
Java performance tuning related tools.
Back to newsletter 218 contents