all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Paredit, smartparens very slow with large latex files
@ 2013-09-11  9:59 Julien Cubizolles
  2013-09-11 13:38 ` Tim Visher
  2013-09-11 15:58 ` Andreas Röhler
  0 siblings, 2 replies; 10+ messages in thread
From: Julien Cubizolles @ 2013-09-11  9:59 UTC (permalink / raw)
  To: help-gnu-emacs

All the minor modes I've tried to navigate through sexps are very slow
when working with large latex files (>1000 lines). For example
sp-forward-sexp takes several seconds to do the following:
\(|\) -> \(\)| whereas it's instantaneous in a small buffer. Is there a
way to improve things ? I tried folding parts of the buffer but it
doesn't help since the folded part is still parsed.

Julien.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
@ 2013-09-11 10:08 Vilibald Wanca
  2013-09-12 20:27 ` Julien Cubizolles
  0 siblings, 1 reply; 10+ messages in thread
From: Vilibald Wanca @ 2013-09-11 10:08 UTC (permalink / raw)
  To: help-gnu-emacs

> All the minor modes I've tried to navigate through sexps are very slow
> when working with large latex files (>1000 lines). For example
> sp-forward-sexp takes several seconds to do the following:
> \(|\) -> \(\)| whereas it's instantaneous in a small buffer. Is there a
> way to improve things ? I tried folding parts of the buffer but it
> doesn't help since the folded part is still parsed.

What about buffer narrowing, have you tried it?

Vilda



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-11  9:59 Julien Cubizolles
@ 2013-09-11 13:38 ` Tim Visher
  2013-09-11 15:58 ` Andreas Röhler
  1 sibling, 0 replies; 10+ messages in thread
From: Tim Visher @ 2013-09-11 13:38 UTC (permalink / raw)
  To: Julien Cubizolles; +Cc: emacs

I've been told several times that any slow-down in emacs based on the
size of the buffer that is below `large-file-warning-threshold` should
be considered a bug. If Fundamental mode doesn't exhibit the problem,
I'd file a bug report with the maintainers of the package.

On Wed, Sep 11, 2013 at 5:59 AM, Julien Cubizolles <j.cubizolles@free.fr> wrote:
> All the minor modes I've tried to navigate through sexps are very slow
> when working with large latex files (>1000 lines). For example
> sp-forward-sexp takes several seconds to do the following:
> \(|\) -> \(\)| whereas it's instantaneous in a small buffer. Is there a
> way to improve things ? I tried folding parts of the buffer but it
> doesn't help since the folded part is still parsed.
>
> Julien.
>
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-11  9:59 Julien Cubizolles
  2013-09-11 13:38 ` Tim Visher
@ 2013-09-11 15:58 ` Andreas Röhler
  2013-09-12 20:36   ` Julien Cubizolles
  1 sibling, 1 reply; 10+ messages in thread
From: Andreas Röhler @ 2013-09-11 15:58 UTC (permalink / raw)
  To: help-gnu-emacs

Am 11.09.2013 11:59, schrieb Julien Cubizolles:
> All the minor modes I've tried to navigate through sexps are very slow
> when working with large latex files (>1000 lines). For example
> sp-forward-sexp takes several seconds to do the following:
> \(|\) -> \(\)| whereas it's instantaneous in a small buffer. Is there a
> way to improve things ? I tried folding parts of the buffer but it
> doesn't help since the folded part is still parsed.
>
> Julien.
>
>
>

IMO basically exist two sources for the problem.

a) an appropriate coding style.
b) slowness from nesting, which might be solved by an appropriate alternative command.

As for b, please tell if command from paredit.el is slow also.

As for a, seeing a style expand, which uses a lot of abstractions, resp. refactoring. This looks nice, enhances readability but makes
it slow very soon.

Best,

Andreas





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-11 10:08 Paredit, smartparens very slow with large latex files Vilibald Wanca
@ 2013-09-12 20:27 ` Julien Cubizolles
  2013-09-13  6:30   ` Andreas Röhler
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2013-09-12 20:27 UTC (permalink / raw)
  To: help-gnu-emacs

Vilibald Wanca <vilibald.wanca@gmail.com> writes:

>> All the minor modes I've tried to navigate through sexps are very slow
>> when working with large latex files (>1000 lines). For example
>> sp-forward-sexp takes several seconds to do the following:
>> \(|\) -> \(\)| whereas it's instantaneous in a small buffer. Is there a
>> way to improve things ? I tried folding parts of the buffer but it
>> doesn't help since the folded part is still parsed.
>
> What about buffer narrowing, have you tried it?
 
It doesn't seem to help.

Julien.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-11 15:58 ` Andreas Röhler
@ 2013-09-12 20:36   ` Julien Cubizolles
  2013-09-13  6:32     ` Andreas Röhler
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2013-09-12 20:36 UTC (permalink / raw)
  To: help-gnu-emacs

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Am 11.09.2013 11:59, schrieb Julien Cubizolles:

> a) an appropriate coding style.
> b) slowness from nesting, which might be solved by an appropriate
> alternative command.
>
> As for b, please tell if command from paredit.el is slow also.

Yes, it's also very slow.

> As for a, seeing a style expand, which uses a lot of abstractions,
> resp. refactoring. This looks nice, enhances readability but makes
> it slow very soon.

I'm not sure I'm following you. What exactly do you suggest ?

Julien.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-12 20:27 ` Julien Cubizolles
@ 2013-09-13  6:30   ` Andreas Röhler
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Röhler @ 2013-09-13  6:30 UTC (permalink / raw)
  To: help-gnu-emacs

Am 12.09.2013 22:27, schrieb Julien Cubizolles:
> Vilibald Wanca <vilibald.wanca@gmail.com> writes:
>
>>> All the minor modes I've tried to navigate through sexps are very slow
>>> when working with large latex files (>1000 lines). For example
>>> sp-forward-sexp takes several seconds to do the following:
>>> \(|\) -> \(\)| whereas it's instantaneous in a small buffer. Is there a
>>> way to improve things ? I tried folding parts of the buffer but it
>>> doesn't help since the folded part is still parsed.
>>
>> What about buffer narrowing, have you tried it?
>
> It doesn't seem to help.
>

These commands must scan-lists in order to find the end or beyond. Therefor they usually do

(save-restriction (widen)...

inside, so narrowing locally has no effect.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-12 20:36   ` Julien Cubizolles
@ 2013-09-13  6:32     ` Andreas Röhler
  2013-09-16 21:14       ` Julien Cubizolles
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Röhler @ 2013-09-13  6:32 UTC (permalink / raw)
  To: help-gnu-emacs

Am 12.09.2013 22:36, schrieb Julien Cubizolles:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> Am 11.09.2013 11:59, schrieb Julien Cubizolles:
>
>> a) an appropriate coding style.
>> b) slowness from nesting, which might be solved by an appropriate
>> alternative command.
>>
>> As for b, please tell if command from paredit.el is slow also.
>
> Yes, it's also very slow.
>
>> As for a, seeing a style expand, which uses a lot of abstractions,
>> resp. refactoring. This looks nice, enhances readability but makes
>> it slow very soon.
>
> I'm not sure I'm following you. What exactly do you suggest ?
>

Please tell the command-name tried from paredit.el.
If you could send me some code off-list, which triggers the bug, that might help to.

There are ways to fasten these things.


Andreas

> Julien.
>
>
>




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-13  6:32     ` Andreas Röhler
@ 2013-09-16 21:14       ` Julien Cubizolles
  2013-09-20  7:14         ` Andreas Röhler
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2013-09-16 21:14 UTC (permalink / raw)
  To: help-gnu-emacs

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:


> Please tell the command-name tried from paredit.el.

paredit-forward takes roughly half a second to go from
\SI{10}{\meter\per\sec|ond} to \SI{10}{\meter\per\sec|ond}| in a large
buffer. It's instantaneous in *scratch*

sp-forward-sexp is even slower for the same task.

> There are ways to fasten these things.

I hope so.

Julien.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Paredit, smartparens very slow with large latex files
  2013-09-16 21:14       ` Julien Cubizolles
@ 2013-09-20  7:14         ` Andreas Röhler
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Röhler @ 2013-09-20  7:14 UTC (permalink / raw)
  To: help-gnu-emacs

Am 16.09.2013 23:14, schrieb Julien Cubizolles:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>
>> Please tell the command-name tried from paredit.el.
>
> paredit-forward takes roughly half a second to go from
> \SI{10}{\meter\per\sec|ond} to \SI{10}{\meter\per\sec|ond}| in a large
> buffer. It's instantaneous in *scratch*
>

paredit-forward makes three stops with your example

start from sec|ond

\SI{10}{\meter\per\second}| to \SI{10}{\meter\per\second}
\SI{10}{\meter\per\second} to| \SI{10}{\meter\per\second}
\SI{10}{\meter\per\second} to \SI{10}{\meter\per\second}|

Seems not suitable at all to travel large buffers that way.

As it happens created a tool for this purposes:

ar-forward-braced-atpt

Checked it that way

\SI{10}{\meter\per\sec|ond}
;; fill in a number of "a" in buffer
(insert (make-string 999999 97)
;; than call ar-forward-braced-atpt from above
\SI{10}{\meter\per\second}

Get a reasonable delay as isearch-forward CHAR would have.

Command is available at

https://launchpad.net/s-x-emacs-werkstatt/

Preferably via bazaar

lp:s-x-emacs-werkstatt







^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-09-20  7:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 10:08 Paredit, smartparens very slow with large latex files Vilibald Wanca
2013-09-12 20:27 ` Julien Cubizolles
2013-09-13  6:30   ` Andreas Röhler
  -- strict thread matches above, loose matches on Subject: below --
2013-09-11  9:59 Julien Cubizolles
2013-09-11 13:38 ` Tim Visher
2013-09-11 15:58 ` Andreas Röhler
2013-09-12 20:36   ` Julien Cubizolles
2013-09-13  6:32     ` Andreas Röhler
2013-09-16 21:14       ` Julien Cubizolles
2013-09-20  7:14         ` Andreas Röhler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.