Resedit (Was: Proposal for KControl)

Guillaume Laurent glaurent at telegraph-road.org
Mon Jul 1 22:53:14 BST 2002


On Monday 01 July 2002 22:36, aleXXX wrote:

> ...and it will slowdown config file parsing and app startup (we read more
> than 10 config files for every app that starts).
> Ok, the parsing of a line stops after a "#" was found, but nevertheless it
> has to run over all the bytes, and such a change would more or less double
> the line number of each config file, wouldn't it ?

Even if it would triple or quadruple it, you'd still wouldn't notice a 
difference.

A few months ago I benchmarked the compilation of a fairly large (in the 100 
KLOCs range) C++ library, once with documentation (doxygen style) in the 
headers, and once without. On a 20mn compile (dual P-III 900, SCSI, 256MB), 
the difference was under 1 second.

Check it for yourself. Suppose all your config files total 2000 lines, say 80 
chars each, half of which begin with '#'. So that's 80,000 chars to scan. 
scanning an std::vector<char> of such a size takes 30ms on my machine (PIII 
600), 10ms if I compile with -O2.

-- 
					Guillaume.
					http://www.telegraph-road.org




More information about the kde-core-devel mailing list