Jump to content
flashjazzcat

The Last Word Reloaded

Recommended Posts

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. :)

 

 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. icon_smile.gif

Edited by flashjazzcat

Share this post


Link to post
Share on other sites

This will be released tomorrow: I won't say what time of day, but it will definitely be Sunday. Prepare yourselves! :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...