git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Jakub NarębskiNext: Junio C Hamano
Message 13 of 23 in “gitweb: use highlight's shebang detection”
  1. gitweb: use highlight's shebang detectionIan Kelling, Sep 6, 2016
  2. Jakub NarębskiSep 20, 2016
  3. Junio C HamanoSep 21, 2016
  4. Jakub NarębskiSep 21, 2016
  5. Ian KellingSep 21, 2016
  6. gitweb: use highlight's shebang detectionIan Kelling, Sep 21, 2016
  7. Ian KellingSep 21, 2016
  8. Jakub NarębskiSep 22, 2016
  9. Ian KellingSep 23, 2016
  10. 1/2 gitweb: remove unused function parameterIan Kelling, Sep 23, 2016
  11. 2/2 gitweb: use highlight's shebang detectionIan Kelling, Sep 23, 2016
  12. Jakub NarębskiSep 23, 2016
  13. Jakub NarębskiSep 24, 2016
  14. Junio C HamanoSep 24, 2016
  15. Ian KellingSep 24, 2016
  16. Ian KellingSep 24, 2016
  17. 1/2 gitweb: remove unused guess_file_syntax() parameterIan Kelling, Sep 24, 2016
  18. 2/2 gitweb: use highlight's shebang detectionIan Kelling, Sep 24, 2016
  19. Jakub NarębskiSep 25, 2016
  20. Ian KellingSep 28, 2016
  21. Jakub NarębskiSep 25, 2016
  22. Jakub NarębskiSep 23, 2016
  23. Junio C HamanoSep 23, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.