rails performance optimization
1.Algorithmic improvements always beat code tweaks
2.As a general rule, maintainability beats performance
3.Only optimize what matters
4.Measure twice, cut once
I think second one may conflict link_to helper methods
somebody said replace link_to with real <a href=""></a> will help performance, but from maintainability opinion I think that's not good idea.
cos once you change your route map rules you need change all the text url links
I know erb is slow, maybe you can try erubis which is announced as 10 percent faster then erb
http://www.kuwata-lab.com/erubis/
分享到:
相关推荐
You don't have to accept slow Ruby or Rails performance. In this comprehensive guide to Ruby optimization, you'll learn how to write faster Ruby code--but that's just the beginning. See exactly what ...
Ruby Performance Optimization: Why Ruby is Slow, and How to Fix It By 作者: Alexander Dymo ISBN-10 书号: 1680500694 ISBN-13 书号: 9781680500691 Edition 版本: 1 出版日期: 2015-11-29 pages 页数: (202) ...
QueryTrack 查找基于ActiveRecord的Rails应用程序的耗时数据库查询的工具。 提供带有回溯,原始SQL,持续时间等的Slack通知。安装将此行添加到应用程序的Gemfile ,然后执行bundle install : gem 'query_track'用法...
10. **性能优化(Performance Optimization):**如缓存策略、数据库查询优化等,以提升API的响应速度。 11. **文档(Documentation):**使用如Swagger或RDoc生成API的文档,方便开发者理解和使用。 理解这些核心概念...
19. **性能优化** (Performance Optimization):分析和提升程序运行效率,如内存管理,减少IO操作,使用缓存等。 20. **敏捷开发** (Agile Development):Scrum, Kanban等方法论,促进快速迭代和适应变化。 以上...