there are a LOT of untruths here.....maybe is the lack of the 
documentation, maybe the lack of willing to read it, but still.... I'll try 
to uncover them one by one.

Let's start saying that these optimizations are on the far End of your - 
high end - project, right were you want to optimize till the last bit to 
get < 200ms load times. This helps everyone to focus on the fact that these 
operations need to be considered at that stage and that stage only: doing 
lots of work to cut from 500ms to 450ms is not going to make your app 
"speedy" at all, use your time to tune everything BUT static files.

ok, now that we're in the ballpark of utter speedification: 
- static assets from 3rd party: you can minify your own bundle and upload 
it to a CDN or use publicly available CDNs. Publicly available CDNs are FAR 
MORE reliable than your own, with one pro being the fact that the user 
would probably not need to download the resource (its probably in the 
browser's cache already). The con here is that your bundle (think, e.g., 
jquery.js + moment.js) isn't available as a single file in publicly 
available CDNs.
- dynamic assets: again, minification and bundling to a CDN are not really 
web2py's job but at most for a script. Use whatever you'd like
- dynamic images: if you're going to serve them a lot, don't compress 
on-the-fly. Compress either at first-access, then serve at nth access, or 
compress with an async task.
- html minification: I'd really like to see a gzipped response (which is 
the 90% gain) confronted to a minified-gzipped response (which would be the 
10% gain). I don't see it in the wild and frankly I wouldn't spend cpu on 
it. Just gzip it
- cache headers: use @cache.action: it's specifically coded for it
- web2py's versioning system: it's hardly "even close to blablabla". 
web2py's versioning system is specifically engineered to work with CDNs and 
upstream proxyies. 

On the last point, I really have to see a simpler develop-to-prod 
deployment.
Probably it's you not grasping it, the docs feel quite clear.... you 
develop whatever you need, you create your main.js and main.css with 
whatever build system you'd like, leave the files in the static folder 
(e.g. /static/css/main.css, /static/js/main.js), you put in models

response.static_version_urls = True
response.static_version = '0.0.1'

and voilà, at the first time a user accesses your page, the upstream proxy 
will fetch the resource ONCE and serve it FOREVER.
Need to correct a small issue with your main.css ? Edit it, save it over 
/static/css/main.css, change 

response.static_version = '0.0.2'

and presto, the upstream proxy is forced to request the new file ONCE and 
serve it FOREVER.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to