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.

visual c++ - What is the fastest way to get just the preprocessed source code with MSVC? -


i'm trying find fastest way complete preprocessed source code (i don't need #line information other comments, raw source code) c source file.

i have following little test program includes windows header file (mini.c):

#include <windows.h> 

using microsoft visual studio 2005, run command:

cl /nologo /p mini.c 

this takes 6 seconds generate 2.5mb mini.i file; changing to

cl /nologo /ep mini.c > mini.i 

(which skips comments , #line information) needs 0.5 seconds write 2.1mb of output.

is aware of techniques improving further, without using precompiled headers?

the reason i'm asking wrote variant of popular ccache tool msvc. part of work, program needs compute hash sum of preprocessed source code (and few other things). i'd make fast possible.

maybe there dedicated preprocessor binary available, or other command line switches might help?

update: 1 idea came mind: define win32_lean_and_mean macro strip out lots of needed code. speeds above preprocessor run factor of approx 3x.

you're repeatedly processing same source file (<windows.h>) in turn pulls in lot of other files. <windows.h> located in default sdk directory.

now, processing unchanging file takes serious time. yet can rely on not changing - it's part of public interface, after all. hence preprocess - strip out comments, instance - , pass version cl /ep.

of course, typically i/o bound task, significant cpu part intermixed. approach processes multiple sources in parallel total throughput. measuring single source preprocesing times isn't relevant.

finally, measure time write output nul. shouldn't including time needed write mini.i disk, since you'll intend pipe output md5sum.


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 -