[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preview: portable dumper
From: |
Alan Mackenzie |
Subject: |
Re: Preview: portable dumper |
Date: |
Sun, 4 Dec 2016 15:22:48 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Hello, Stefan.
On Sun, Dec 04, 2016 at 09:08:26AM -0500, Stefan Monnier wrote:
> > Your patch was indeed simpler. Indeed, it was so simple as actually not
> > to work in general, as well as being ~2 orders of magnitude slower than
> > the current (forward-comment -1).
> You make it sound like it barely ever works and it's always 100
> times slower. I think this qualifies as "gross misrepresentation".
I don't think it does.
Your patch won't work, for example, if a lisp program sets syntax-table
text properties (which is _always_ done when
before/after-change-functions are disabled). This is a very important
scenario.
Consider (forward-comment -1) backwards over a 100 character comment.
The current code will do this in 100n units of time, for some value of
n. In your patch, we need to calculate the parse-partial-sexp state at
the comment, and this is going to involve a parse-partial-sexp moving
forward over, on average, 10,000 characters. This is going to take
10,000m units of time, for some m. 10,000m is two orders of magnitude
larger than 100n.
Now, I'm not saying your patch couldn't be improved to handle these and
other things. Firstly, it then wouldn't be a "simple" patch any longer.
And the next thing, why bother, when the comment-cache code already
exists and works?
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Preview: portable dumper, (continued)
- Re: Preview: portable dumper, Dmitry Gutov, 2016/12/04
- Re: Preview: portable dumper, Eli Zaretskii, 2016/12/04
- Re: Preview: portable dumper, Daniel Colascione, 2016/12/03
- Re: Preview: portable dumper, Dmitry Gutov, 2016/12/03
- Re: Preview: portable dumper, Stefan Monnier, 2016/12/03
- Re: Preview: portable dumper, Daniel Colascione, 2016/12/03
- Re: Preview: portable dumper, Stefan Monnier, 2016/12/03
- Re: Preview: portable dumper, Alan Mackenzie, 2016/12/04
- Re: Preview: portable dumper, Dmitry Gutov, 2016/12/04
- Re: Preview: portable dumper, Stefan Monnier, 2016/12/04
- Re: Preview: portable dumper,
Alan Mackenzie <=
- forward-comment and syntax-ppss (was: Preview: portable dumper), Stefan Monnier, 2016/12/04
- Re: forward-comment and syntax-ppss (was: Preview: portable dumper), Alan Mackenzie, 2016/12/06
- Re: forward-comment and syntax-ppss, Stefan Monnier, 2016/12/06
- Re: forward-comment and syntax-ppss, Andreas Röhler, 2016/12/07
- Re: forward-comment and syntax-ppss, Stefan Monnier, 2016/12/07
- Re: forward-comment and syntax-ppss, Andreas Röhler, 2016/12/07
- Re: forward-comment and syntax-ppss, Clément Pit--Claudel, 2016/12/07
- Re: forward-comment and syntax-ppss, Alan Mackenzie, 2016/12/07
- Re: forward-comment and syntax-ppss, Clément Pit--Claudel, 2016/12/07
- Re: forward-comment and syntax-ppss, Alan Mackenzie, 2016/12/08