The standard display resolution of the NES is 256 horizontal pixels by 240 vertical pixels. Upscaling on a canvas context can be a very slow operation even if you use the nearest-neighbor approach.
<canvas width="256" height="240" style="width:512px;height:480px"></canvas>