(27)Throw hardware at the problem, not developersweb
招数27:性能
把问题仍给硬件而不是开发人员网站
As developers, we often want to fix problems with code, but don’t be afraid to ‘put the compiler down’ and throw some hardware at the problem.
做为开发人员,咱们一般想经过代码解决问题,但不要惧怕‘批评编译器’和把问题仍给硬件。ui
Performance problems caused by disk I/O bottlenecks or paging out of RAM can often be solved by a faster hard drive or more RAM. CPUbound bottlenecks can often be solved by a new machine with a faster processor.
因为磁盘I/O瓶颈或者分页内存泄露引发的性能问题一般能够经过更快的硬盘驱动器或更多的内存解决。CPU密集型瓶颈一般能够经过一个新的装有更快速度处理器的机器解决。rest
As counterintuitive as it sounds, addressing problems by buying a new machine or upgrading an aging one is often much cheaper than having a developer troubleshoot, diagnose, and correct a deep performance problem. And the rest of your website will get a performance kick to boot!
这听起来有违直觉,诊断并修正一个深层次性能问题,经过购买新机器解决问题或者升级老化的部件一般比让开发人员解决问题成本低的多。而且你的其余网站会获得一个性能提高。code