0

Currently, a request is taking a long time. The log I get is

Completed 200 OK in 22365ms (Views: 17995.5ms | ActiveRecord: 1280.4ms)

This is an iOS rails application and actually no view is being generated. Is there a way to reduce the time taken to render views in iOS rails application?

4

1 回答 1

1

有多种方法可以减少请求时间:

1) Minimize HTTP Requests
2) Use a Content Delivery Network
3) Avoid empty src or href
4) Add an Expires or a Cache-Control Header
5) Gzip Components
6) Put StyleSheets at the Top
7) Put Scripts at the Bottom
8) Avoid CSS Expressions
9) Make JavaScript and CSS External
10) Reduce DNS Lookups
11) Minify JavaScript and CSS
12) Avoid Redirects
13) Remove Duplicate Scripts
14) Configure ETags
15) Make AJAX Cacheable
16) Use GET for AJAX Requests
17) Reduce the Number of DOM Elements
18) No 404s
19) Reduce Cookie Size
20) Do Not Scale Images in HTML
21) Make favicon.ico Small and Cacheable

您可以更详细地阅读所有这些内容http://yslow.org/

于 2013-06-07T10:03:49.507 回答