Optimal use of excess compressor heat