Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

django - gzip - questions about performance -


firstly, i'm using django. django provides gzip middleware works fine. nginx provides gzip module. make more sense use nginx's gzip module because implemented purely in c, or there other performance considerations i'm missing.

secondly, django doesn't gzip under 200 bytes. because gzipping expensive have value when compressing output smaller that?

thirdly, api i'm building purely dynamic little caching. gzipping expensive enough make unpractical use in situation (vs situation cache gzipped output on webserver)?

1) imagine 1 gzip compression enough , nginx faster, although haven't benchmarked yet. gzipmiddleware utilizes few built-ins, might optimized, too.

# http://www.xhaus.com/alan/python/httpcomp.html#gzip # used permission. def compress_string(s):     import cstringio, gzip     zbuf = cstringio.stringio()     zfile = gzip.gzipfile(mode='wb', compresslevel=6, fileobj=zbuf)     zfile.write(s)     zfile.close()     return zbuf.getvalue() 

2) small gzip'd files can't take advantage compression (in fact small files might bigger, when processed), 1 can save time skipping step.

3) design test suite including sample data. decide on data, works best application.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -