[Python-mode] lean navigation

Barry Warsaw barry at python.org
Sun Mar 3 19:09:44 EST 2019


Hi Andreas.  Thanks for continuing to work on this library.  Honestly, I haven’t noticed any performance problems in a long time.  python-mode.el continues to work great for me.

-Barry

> On Dec 29, 2018, at 03:01, Andreas Röhler <andreas.roehler at online.de> wrote:
> 
> Hi all,
> 
> when a class has a large amount of defs inside, jumping to the end of
> class might take some noticeable time. (Albeit don't see a bug report so
> far.)
> 
> For now, navigating Python source internally is done by
> ‘py-forward-statement’ resp. ‘py-backward-statement’ - where
> ‘statement’ means just ‘section of code starting at its own indent’.
> While this seems complete and reliable, it does several checks we
> might get rid off in certain circumstances when speed matters.
> 
> For example when jumping to the end from a known block-start, may
> reason from the current indentation: any further start lesser/equal
> indented can't be part of.
> 
> This makes some assumptions WRT formatting and might fail in case of
> uncommon or mixed formats using semicolons for example. As it's about
> an editor here and not about a lexer/parser IMO the change might be
> worth it. OTOH: how often exist these large classes?
> 
> Maybe have a customizable boolean py-use-speed-navigation-p?
> Just a RFC,
> 
> Cheers,
> Andreas
> 
> 
> 
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://mail.python.org/pipermail/python-mode/attachments/20190303/d91a9a62/attachment.sig>


More information about the Python-mode mailing list