Very Good News for the Dynamic HUD’s "Hot MacBook Pro" Problem

There are rules in programming for optimising code:

  1. Don’t.
  2. Don’t Yet (for experts only).

Poker Copilot 4’s Dynamic HUD was causing some people to get warm laps.You know the problem; you have your computer on your lap, you are running some software that pushes your computer’s CPU, and it therefore gets so warm it is uncomfortable to have on your lap.

This seemed like an optimising situation “for experts only”. Excellent! Us programmers love the chance to do some necessary optimisation.

The next rule is:

3. Profile before optimising

I used Java’s excellent VisualVM tool to do this. I discovered the screen scraping code was taking way too long, and making the CPU do way too much work So, over the last few days, I took my easy-to-read, modular code and squeezed every bit of performance out of it that I could. Now I have hard-to-read, compact code. Usually that’s bad. But when it improves the speed of the screen scraping code by 15 times, it is good.

Last night I tried playing online poker with the optimised Dynamic HUD, while my MacBook Pro was on my lap. To really beef up the test, I did this on a hot summer’s night in Barcelona in a room with no air-conditioning. The Max§cBook Pro stayed pleasantly cool.

The next update of Poker Copilot will feature these improvements, thereby solving the uncomfortably warm lap problem.