From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bois Francois-Xavier Newsgroups: gmane.emacs.devel Subject: Re: web-mode.el and speed Date: Mon, 7 Oct 2013 22:21:30 +0200 Message-ID: References: <8338oc6e4y.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bb03ff8f36d2e04e82c66f7 X-Trace: ger.gmane.org 1381177317 7487 80.91.229.3 (7 Oct 2013 20:21:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2013 20:21:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 07 22:22:00 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VTHJW-0001EO-G3 for ged-emacs-devel@m.gmane.org; Mon, 07 Oct 2013 22:21:58 +0200 Original-Received: from localhost ([::1]:33372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTHJV-0002sE-Pu for ged-emacs-devel@m.gmane.org; Mon, 07 Oct 2013 16:21:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTHJS-0002s5-1N for emacs-devel@gnu.org; Mon, 07 Oct 2013 16:21:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTHJQ-0002eC-RD for emacs-devel@gnu.org; Mon, 07 Oct 2013 16:21:53 -0400 Original-Received: from mail-qe0-x234.google.com ([2607:f8b0:400d:c02::234]:55482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTHJO-0002bq-Sk; Mon, 07 Oct 2013 16:21:50 -0400 Original-Received: by mail-qe0-f52.google.com with SMTP id w7so1571549qeb.39 for ; Mon, 07 Oct 2013 13:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=plBLOV3AGxKV/DBEsYUg8Dbhyd53ELy1jJN0mKKF3wo=; b=JYQmSHrOxUs1OHoTDIx+BxohOXQpzbBdj/iu6i6RKNpTchm/hLnawhzIO9Def3Levs eLnh+awssw8mKQf/9i7VcHBX1KRvCGtRO13pW3epiFspy9++4Y1EdBT0PZtturNfyAhB qLRRdpxPP95ENOHk3pm1lOv014qSgJp4BG6pajhkWPa0UFll25+G+tWyeRDoFo93f/7n 960lFz/z0c0SNfE+0lG2eV1TOJAbcxINsJCId0IZOpF0NlaMoD+Wmfk3rvOjle6VSh9u fDMIDwodLt8Ugsk+f7g3ZnrC4bgXwncAxa8zJ6nnlOpoDGpiXv7drrnjV70Avpzl6nsA VkJg== X-Received: by 10.49.50.198 with SMTP id e6mr4956287qeo.87.1381177310274; Mon, 07 Oct 2013 13:21:50 -0700 (PDT) Original-Received: by 10.140.81.169 with HTTP; Mon, 7 Oct 2013 13:21:30 -0700 (PDT) In-Reply-To: <8338oc6e4y.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163969 Archived-At: --047d7bb03ff8f36d2e04e82c66f7 Content-Type: text/plain; charset=UTF-8 I think that a function that would not rely on regexp could improve drastically the performance. For seconds are needed to load the html5-spec page. And most of the time is spent identifying tags. So any micro optimization can have a huge impact. (I have previously won 20% in perfomance when I modified the tag attributes parser function to use chars instead of strings. I would have never thought that the gain would be so large) On Mon, Oct 7, 2013 at 10:05 PM, Eli Zaretskii wrote: > > From: Bois Francois-Xavier > > Date: Mon, 7 Oct 2013 21:29:42 +0200 > > > > I think that using a search-chars-forward (native) function could improve > > the performance > > (search-chars-foward '(?\< ?\>)) > > What's wrong with skip-chars-forward? > --047d7bb03ff8f36d2e04e82c66f7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I think that a function that would not rely on regexp coul= d improve drastically the performance.
For seconds are needed to load t= he html5-spec page. And most of the time is spent identifying tags. So any = micro optimization can have a huge impact.

(I have previously won 20% in perfomance when= I modified the tag attributes parser function to use chars instead of stri= ngs. I would have never thought that the gain would be so large) =C2=A0


On Mon,= Oct 7, 2013 at 10:05 PM, Eli Zaretskii <eliz@gnu.org> wrote:
=
> From: Bois Francois-Xavier <fxb= ois@gmail.com>
> Date: Mon, 7 Oct 2013 21:29:42 +0200
>
> I think that using a search-chars-forward (native) function could impr= ove
> the performance
> (search-chars-foward '(?\< ?\>))

What's wrong with skip-chars-forward?



--047d7bb03ff8f36d2e04e82c66f7--