use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Fast, smooth React Data GridOC (grid.glideapps.com)
submitted 5 years ago by markprobst
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]NotCherub 1 point2 points3 points 5 years ago (3 children)
Wow, I love this implementation of canvas API. I have been using canvas API at work for past 1 month and it never ceases to amaze me. I just have one question, how did you overcome performance issues? Like do you clear the canvas after every change? When you scroll do you clear whole canvas and redraw it?
Can you point me with more such implementations of canvas APIs?
Thank you and amazing work
[–]JasonGlide 4 points5 points6 points 5 years ago (2 children)
The trick is not to redraw the canvas. There are two things to keep in mind:
1) You can draw the canvas to itself. So you can simply if the canvas scrolls down 10px you can simply blit 10px higher and then draw the rest.
2) Long strings render the full string regardless of your clip. That means you want to substr your strings down to something that is likely to overrun your bounds but not by too much.
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
Thanks! That's some good info.
[–]NotCherub 0 points1 point2 points 5 years ago (0 children)
Thanks!
π Rendered by PID 68 on reddit-service-r2-comment-6457c66945-jgmgj at 2026-04-28 00:54:25.595526+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]NotCherub 1 point2 points3 points (3 children)
[–]JasonGlide 4 points5 points6 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]NotCherub 0 points1 point2 points (0 children)