Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inefficient algorithm for DrawRect #1

Open
lukewilson2002 opened this issue Apr 15, 2021 · 0 comments
Open

Inefficient algorithm for DrawRect #1

lukewilson2002 opened this issue Apr 15, 2021 · 0 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@lukewilson2002
Copy link
Owner

The function DrawRect in [ui/drawfunctions.go] makes too many calls to (tcell.Screen).SetContent(). A better algorithm would make a call to SetContent only once per row, and would therefore make use of the (currently set nil) combc parameter of the function. A performance graph has been included below showing the current state of the performance compared to other parts of the editor.

image

Generated by running the editor with -cpuprofile cpu.prof and to view it: go tool pprof cpu.prof -> web

@lukewilson2002 lukewilson2002 added the good first issue Good for newcomers label Apr 15, 2021
@lukewilson2002 lukewilson2002 added this to the 1.0 milestone Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant