Skip to content

Conversation

@2fast2fourier
Copy link
Contributor

What's this PR do?

This PR fixes two major performance hits when running a program that has very fast debug output. The first is to simplify the RX/TX flashes to avoid triggering expensive React changes. The second is to rework console output updating to avoid expensive scroll operations and has the additional benefit of allowing smooth scrollback even as more data comes in.

What are the important parts of the code?

The scroller.js class in the editor plugin contains the receive pane update logic which controls the majority of the scrolling logic. The indicators.js class contains the new RX/TX logic.

How should this be tested by the reviewer?

Run a fast-loop debug program at various speeds, try to scroll back the window and see how it functions. Verify the window will re-enter 'sticky' mode when scrolled to the bottom of the screen.

Is any other information necessary to understand this?

This fixes a major performance issue on older chromebook devices by reducing the redraw/scroll events within the receive pane.

What are the relevant tickets? (Please add closes, refs, etc)

Closes #178

@2fast2fourier
Copy link
Contributor Author

A simple fast-debug-loop:

'{$STAMP BS2}
'{$PBASIC 2.5}

Idx VAR WORD

'Set this to 10, 100, 500 and test scroll-back.
Delay CON 10

Idx = 0

DO
  Idx = Idx + 1
  DEBUG "Loop ", DEC Idx, CR
  HIGH 0
  DEBUG "On",CR
  PAUSE Delay
  LOW 0
  DEBUG "Off",CR
  PAUSE Delay
LOOP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be function Scroller(){ so you don't have an anonymous class

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ints here are just shortcuts to px styles, but this is fine

phated added a commit that referenced this pull request Jul 21, 2015
Major performance improvements in console and TX/RX flash
@phated phated merged commit f84f6ee into master Jul 21, 2015
@phated phated deleted the dom-flash branch July 21, 2015 18:53
@phated phated removed their assignment Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug Rx Buffer display problem causes freeze

3 participants