Re: [code] [code}[textadept] elastic tabstops 'unleashed' version release

From: Justin Dailey <dail8859.att.yahoo.com>
Date: Tue, 21 Nov 2017 16:30:02 +0000 (UTC)

 Peter,You are correct that the original algorithm for computing the tabstops is horribly inefficient. I haven't had a chance to look at your code but wanted to provide a bit of extra info.
About a year ago I implemented elastic tabstops for Notepad++ (see https://github.com/dail8859/ElasticTabstops/ ) as a plugin using the original algorithm. I've gone through a couple of rewrites of the core to optimize it a great deal so that it has to look at as little as text as possible when editing the file (or when running macros or replacing multiple results). Though I haven't directly compared it to see how much more "optimized" it is from previous implementations, it does seem to be substantially faster in the worst-case scenarios. My current implementation is here https://github.com/dail8859/ElasticTabstops/blob/master/src/ElasticTabstops.cpp if you or anyone is interested :)

Justin

    On Tuesday, November 21, 2017, 9:17:31 AM EST, Peter Rolf <indiego.att.gmx.net> wrote:
 
 Hi,

I just finished my code cleanup on the original "Elastic Tabstops"
module by Joshua Krämer (thanks!). This version is about 2-561 bazillion
times faster than the reference code (of course this is just a rough
approximation). If you know how to profile this module, let me know. The
best I could find was "pepperfish" for Lua 5.1 (profiling doesn't seem
popular in Lua).

Aside from the speed improvements, I added support for multi style text
elements and the level of indentation is modifiable now. There is also
an single gif which shows part of my 'init.lua'. Be sure to use a
'correct' scaling value (best at 100%, 200%, 400%...), otherwise it will
mess up the picture.

The module is not tested much (only with a hand full of texts I use) and
I also haven't read the Scintilla related part (so my understanding of
the algorithm is still limited). Let me know if you find a bug or have
suggestions for improvement.

https://spideroak.com/browse/share/indiego/public/textadept/

Best wishes,  Peter

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
  
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 21 Nov 2017 - 11:30:02 EST

This archive was generated by hypermail 2.2.0 : Wed 22 Nov 2017 - 06:41:08 EST