Re: [PATCH v3 2/2] gitweb: use highlight's shebang detection
- From
Jakub Narębski <jnareb@gmail.com>
- Date
- Sep 24, 2016, 16:21 UTC
- Message-ID
- <946807ff-1570-2d81-1026-06529164f8ef@gmail.com>
- In-Reply-To
- <2a4c3efb-2145-b699-c980-3079f165a6e1@gmail.com>
W dniu 24.09.2016 o 00:15, Jakub Narębski pisze:
> W dniu 23.09.2016 o 11:08, Ian Kelling napisał:
Show 17 quoted lines
>> After curling blob view of unhighlighted large and small text >> files of perl code and license text 100 times each on a local >> Apache/2.4.23 (Debian) instance, it's logs indicate +-1% difference in >> request time for all file types. > > Also, "curling" is not the word I would like to see. I would say: > > Simple benchmark comparing performance of 'blob' view of files without > syntax highlighting in gitweb before and after this change indicates > ±1% difference in request time for all file types. Benchmark was > performed on local instance on Debian, using Apache/2.4.23 web server > and CGI/PSGI/FCGI/mod_perl. > > ^^^^^^^^^^^^^^^^^^^^^^--- select one > > Or something like that; I'm not sure how detailed this should be. > But it is nice to have such benchmark in the commit message.
Sidenote: this way of benchmarking of gitweb falls between two ways of doing a benchmark.
The first method is to simply run gitweb as a standalone script, passing its parameters in CGI environment variables; just like the test suite does it. You would 'time' / 'times' it a few times, drop outliers, and take average or a median. With this method you don't even need to set up a web server.
The second is to use a specialized program to benchmark the server-side of a web page, for example 'ab' (ApacheBench), httperf, curl-loader or JMeter. The first one is usually distributed together with Apache web server, so you probably have it installed already. Those tools provide timing statistics.
[...]
> Note that the performance loss might be quite higher on MS Windows, with > its higher cost of fork. But then they probably do not configure > server-side highligher anyway.