[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] RT reply form submission (Emacs-w3m bug)
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Wed, 14 Oct 2015 08:30:37 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 12519
- References: <20151009193149.25c4bca3@freedom-laptop> <b4mfv1fxz7w.fsf@jpl.org> <20151013112004.054c2129@freedom-laptop>
Hi Bruno,
On Tue, 13 Oct 2015 11:20:04 -0300, Bruno Félix Rezende Ribeiro wrote:
> The problem is not at that very page, rather it's in servers running
> the RT software they provide there, like the GNU project's
> https://rt.gnu.org/. Unfortunately, one can't test without logging
> into the system. I'm sorry for not expressing myself clearly enough.
Ok, I've installed the change.
>> But it would be better to be:
>> (if (cdr buf)
>> (encode-coding-string (cdr buf) coding)
>> "")
> Well, I looked for the most internal change I could make as to not
> disrupt any existing functionality --- so I couldn't make any
> assumptions, and also I needed a fast and simple change and did not
> have time to study the surroundings semantics.
> For your patch to be equivalent to mine we have to assume that
> (encode-coding-string "" coding) == ""
> If that is the case, I see no problem. ;-)
As far as I see the benchmark[1] tests, the encode-coding-string
funcall seems to take more time even if it does nothing:
(let ((buf '(nil . nil)) (coding 'utf-8))
(benchmark 1000000
(encode-coding-string (if (cdr buf) (cdr buf) "") coding)))
0.7090411186218262
0.7090411186218262
0.7220408916473389
(let ((buf '(nil . nil)) (coding 'utf-8))
(benchmark 10000000
(if (cdr buf) (encode-coding-string (cdr buf) coding) "")))
0.41602396965026855
0.4350249767303467
0.42002391815185547
Probably such a large repetition will not take place, though. ;-)
Regards,
[1] I use Lars' benchmark.el[2]. I feel it offers more practical
result rather than the one that Emacs bundles.
[2] http://quimby.gnus.org/elisp/benchmark.el