Slight blinking of contrast when clearing and updating

I don't know about clear, is it using the hardware display clear, or is it overwriting the display content?

Yes to both questions.

The lcd.clear() function invokes the LCD controller 'Clear Display' instruction.

The LCD controller 'Clear Display' instruction writes the ASCII code for a space into all 80 memory locations in the controller display memory, thus overwriting the display content.

Don