bongo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-devel] Re: Marks


From: Daniel Jensen
Subject: [bongo-devel] Re: Marks
Date: Tue, 13 Feb 2007 03:03:56 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

Okay, so I guess what all this comes down to is that

a) we should leave the marks after commands (customizable),
b) and the stack is probably overkill. (Who uses it in Gnus anyway?)
c) Unmarking all saves the marks, or we can have a separate command.
d) We use the `* *' command because it's handy.

Did I get it right?

And I don't think I mind "marking" for a set of marks. Where have you
seen it used like this?

Daniel Brockman <address@hidden> writes:

> However, I couldn't see any performance improvement when
> using this function, which avoids the repeated linear search.
>
> (defun bongo-invert-marks ()
>   "Mark unmarked tracks, and unmark marked tracks in the buffer."
>   (interactive)
>   (setq bongo-marked-track-line-markers nil)
>   (save-excursion
>     (goto-char (point-min))
>     (while (not (eobp))
>       (cond ((bongo-marked-track-line-p)
>              (let ((bongo-marked-track-line-markers nil))
>                (bongo-unmark-line)))
>             ((bongo-track-line-p)
>              (bongo-mark-line)))
>       (forward-line 1))))
>
> Maybe I'm confused?

Wow, I tested running this function 100 times in a small library
buffer, and it took a minute. But removing redisplay from unmark and
mark commands, it took only three seconds.

I'm profiling the code, and I see bottlenecks in
`bongo-line-internal-infoset' and `bongo-line-get-property'. The
latter is called a lot of times all over the place. We could use a
little optimization here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]