From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Juergen Kreileder <jk@blackdown.de>, Junio Hamano <gitster@pobox.com>
Subject: Re: [PATCH 4/3] gitweb: Fix fallback mode of to_utf8 subroutine
Date: Mon, 19 Dec 2011 13:11:57 +0100 [thread overview]
Message-ID: <201112191311.58787.jnareb@gmail.com> (raw)
In-Reply-To: <201112190154.19107.jnareb@gmail.com>
Jakub Narebski wrote:
> e5d3de5 (gitweb: use Perl built-in utf8 function for UTF-8 decoding.,
> 2007-12-04) was meant to make gitweb faster by using Perl's internals
> (see subsection "Messing with Perl's Internals" in Encode(3pm) manpage)
>
> Simple benchmark confirms that (old = 00f429a, new = this version);
> note that it is synthetic benchmark of standalone subroutines, not
> of gitweb itself
>
> old new
> old -- -65%
> new 189% --
Nb. that was about operations / second (higher is better):
Rate old new
old 2067/s -- -65%
new 5863/s 184% --
Or in slightly different benchmark (more smaller lines):
Rate old new
old 277/s -- -73%
new 1021/s 268% --
old$ time ./t9500-gitweb-standalone-no-errors.sh >/dev/null
real 1m16.788s
user 1m0.908s
sys 0m14.033s
user+sys 1m14.941s
new$ time ./t9500-gitweb-standalone-no-errors.sh >/dev/null
real 1m12.216s
user 0m57.300s
sys 0m13.329s
user+sys 1m10.639s
Though such benchmarks should have been a part of e5d3de5.
P.S. I started to get strange errors
XML Parsing Error: xml processing instruction not at start of external entity
Location: http://localhost/cgi-bin/gitweb/gitweb.cgi
Line Number 37, Column 1:
<?xml version="1.0" encoding="utf-8"?>
^
while "show source" shows that '<?xml version="1.0" encoding="utf-8"?>'
is the first line. WTF?!?
P.P.S. Now I am getting errors when running gitweb, but only in some
cases (via mod_cgi not as standalone script, only when using lynx),
namely it looks like it falls back to 'latin1' when doing content
which is valid UTF-8.
Will investigate.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2011-12-19 12:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-17 9:22 [PATCH 0/3 (resend)] gitweb: Various to_utf8 / esc_html fixes Jakub Narebski
2011-12-17 9:22 ` [PATCH 1/3] gitweb: Call to_utf8() on input string in chop_and_escape_str() Jakub Narebski
2011-12-17 9:22 ` [PATCH 2/3] gitweb: esc_html() site name for title in OPML Jakub Narebski
2011-12-17 9:22 ` [PATCH 3/3] gitweb: Output valid utf8 in git_blame_common('data') Jakub Narebski
2011-12-17 19:27 ` [PATCH 0/3 (resend)] gitweb: Various to_utf8 / esc_html fixes Junio C Hamano
2011-12-19 0:54 ` [PATCH 4/3] gitweb: Fix fallback mode of to_utf8 subroutine Jakub Narebski
2011-12-19 12:11 ` Jakub Narebski [this message]
2011-12-19 16:21 ` [PATCH 4/3 v2 (bugfix)] " Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201112191311.58787.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jk@blackdown.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.