One last suggestion: Using double-buffering, where the tilemap is rendered unscaled and then render the buffered image scaled onto the canvas? Of course only the relevant region of the tilemap needs to be rendered. Perhaps this is really inefficient, just a thought.
Just trying to help, and I do have years of experience as a CAD developer (not that I know much about javascript or game development).