chore: deprecate high performance rendering cmds
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Performance rendering is very limited in what it can do and is very hard to implement.
authored by Ayman Bagabas · committed by Christian Rocha · parent de4788d · Browse files · 2 files·+17 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+17 added−0 removed
- other:+17 added−0 removed
Provenance
- Commit
cfef822- Tree
fddb2a6- Author
Ayman Bagabas <ayman.bagabas@gmail.com>- Committer
Christian Rocha <christian@rocha.is>- Parent
de4788d
2 files changed+17 added−0 removed
modified:options.go+3 added
183 unmodified lines184 // smaller output, at the cost of some processing overhead.185 //186 // This feature is provisional, and may be changed or removed in a future version187 // of this package.188+//189+// Deprecated: this incurs a noticable performance hit. A future release will190+// optimize ANSI automatically without the performance penalty.191 func WithANSICompressor() ProgramOption {192 return func(p *Program) {193 p.startupOptions |= withANSICompressor194 }58 unmodified linesmodified:standard_renderer.go+14 added
544 unmodified lines545 // different than the normal way we approach rendering in Bubble Tea. It's for546 // use in high-performance rendering, such as a pager that could potentially547 // be rendering very complicated ansi. In cases where the content is simpler548 // standard Bubble Tea rendering should suffice.549+//550+// Deprecated: This option is deprecated and will be removed in a future551+// version of this package.552 func (r *standardRenderer) insertTop(lines []string, topBoundary, bottomBoundary int) {553 r.mtx.Lock()554 defer r.mtx.Unlock()555 19 unmodified lines575 //576 // See note in insertTop() for caveats, how this function only makes sense for577 // full-window applications, and how it differs from the normal way we do578 // rendering in Bubble Tea.579+//580+// Deprecated: This option is deprecated and will be removed in a future581+// version of this package.582 func (r *standardRenderer) insertBottom(lines []string, topBoundary, bottomBoundary int) {583 r.mtx.Lock()584 defer r.mtx.Unlock()585 76 unmodified lines662 // scrollable area. This is required to initialize the scrollable region and663 // should also be called on resize (WindowSizeMsg).664 //665 // For high-performance, scroll-based rendering only.666+//667+// Deprecated: This option will be removed in a future version of this package.668 func SyncScrollArea(lines []string, topBoundary int, bottomBoundary int) Cmd {669 return func() Msg {670 return syncScrollAreaMsg{671 lines: lines,8 unmodified lines680 // ClearScrollArea deallocates the scrollable region and returns the control of681 // those lines to the main rendering routine.682 //683 // For high-performance, scroll-based rendering only.684+//685+// Deprecated: This option will be removed in a future version of this package.686 func ClearScrollArea() Msg {687 return clearScrollAreaMsg{}688 }689 7 unmodified lines697 // lines below down. Lines that are pushed out the scrollable region disappear698 // from view.699 //700 // For high-performance, scroll-based rendering only.701+//702+// Deprecated: This option will be removed in a future version of this package.703 func ScrollUp(newLines []string, topBoundary, bottomBoundary int) Cmd {704 return func() Msg {705 return scrollUpMsg{706 lines: newLines,13 unmodified lines720 // existing lines above up. Lines that are pushed out of the scrollable region721 // disappear from view.722 //723 // For high-performance, scroll-based rendering only.724+//725+// Deprecated: This option will be removed in a future version of this package.726 func ScrollDown(newLines []string, topBoundary, bottomBoundary int) Cmd {727 return func() Msg {728 return scrollDownMsg{729 lines: newLines,40 unmodified lines