Hello,
You and I have the same concern with show list of materials in HTML Dialog with speed.
I have already released a new version of my free extension name 5D+ Library. You can download and see my code in HTML and JS (I didn’t encrypt them except Ruby codes).
In Ruby, I only write a material to an image has size 256x256, then push the image link and material HSL delta values to the HTML Dialog. Then I draw canvas and hande changing colors with JS to adapt the speed.
The results is my material edior react quicker than the Material Editor of SketchUp native, even user change the color on the native.
Here is the topic link: