flashjazzcat #1 Posted October 20, 2009 This is a video of a developmental version of LW 3.01 scrolling and entering text in 80 column mode at roughly twice the speed of the recently released version 3.0: LW 3.01.wmv I was pondering over a way to speed up the screen updates today at work and I couldn't wait to get back to the PC to test them out. There are still some problems to be ironed out (like the cursor leaving trails behind), but the cursor rips through the text in 80 column mode now, and even 40 column mode is noticeably faster. There's a lot of work to do on these mods yet, but believe me this will feel breathtakingly quick for an 80 column editor. Quote Share this post Link to post Share on other sites
+Stephen #2 Posted October 20, 2009 This is a video of a developmental version of LW 3.01 scrolling and entering text in 80 column mode at roughly twice the speed of the recently released version 3.0: LW 3.01.wmv I was pondering over a way to speed up the screen updates today at work and I couldn't wait to get back to the PC to test them out. There are still some problems to be ironed out (like the cursor leaving trails behind), but the cursor rips through the text in 80 column mode now, and even 40 column mode is noticeably faster. There's a lot of work to do on these mods yet, but believe me this will feel breathtakingly quick for an 80 column editor. Wow - how did you do that? Stephen Anderson Quote Share this post Link to post Share on other sites
flashjazzcat #3 Posted October 20, 2009 (edited) Wow - how did you do that? Not all that complicated but the effect is amazing. The screen redraw has two loops for each line: the first establishes the length of the line (after wordwrap) and takes care of the non-linear text buffer, and the second loop actually sends the characters of the line to the screen. The character put routine doesn't repaint the character if it's already at x,y (it's always been that way and the editor would be unuseably slow without that technique). What I've just added is a table of pointers to the memory location (in the text buffer) of the start of each line of text on the screen. Once the screen's been drawn initially, subsequent redraws check the address of each line against this table. If the start of the line of text being prepared for display is the same address contained in the table, the whole line is skipped and the refresh routine goes straight to the next one, thus cutting out the whole second loop which calls the character put routine 80 times. Given there are up to 1,600 characters on the screen, this is probably saving a few hundred thousand cycles for each screen redraw when you're just moving the cursor or editing a line. Of course, when editing causes "ripples" down the screen, things slow down momentarily while things are readjusted to line up. As I say, both text modes are on average about twice as fast. There are lots of glitches, though, so hopefully the code needed to sort them out won't impact on the efficiency gains too much. Edited October 20, 2009 by flashjazzcat Quote Share this post Link to post Share on other sites
NML32 #4 Posted October 20, 2009 Great work, looks good. Quote Share this post Link to post Share on other sites
flashjazzcat #5 Posted November 7, 2009 This will be released tomorrow: I won't say what time of day, but it will definitely be Sunday. Prepare yourselves! Quote Share this post Link to post Share on other sites