Question

I am working on my captcha image script, I know the fonts I use are stored on the server end but I am wondering for a high traffic site, does the font size (like kb and mb not dimensions) does it make a difference on the server? Some font's I was messing with are like 4-5mb and then some are under 1mb, is it better to use the smallest fonts or does it not make a difference?

Was it helpful?

Solution

The fonts are not being sent to the visitors of your site if they are being used to generate a captcha image. In this case, they are only being read internally by your image generation libraries, in which case the only thing you have to worry about is disk/memory access time.

I don't think reading the font files is going to give you any performance problems. The image generation is likely a lot more time-consuming, and would be a better place to optimize if you needed to. However, unless you're having problems with it, premature optimization is generally not a good use of your time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top