Khan / Khan/live-editor

scrubbing is laggy and can crash the browser for very large programs

Open
#308 2 comments 0 reactions 0 assignees View on GitHub
pjs
Dominant language
JavaScript
Stars
776
Forks
180
PR merge metrics
No merged PRs in 30d

Description

> https://www.khanacademy.org/computer-programming/front-line-v7955-delta/6440454291849216
> I think it's just that this specific program is massive that makes it run out of RAM
> I always use Chrome, as Firefox seems to be unable to obtain enough memory to even run the program fast enough. After testing for awhile, it only happens on low-performance devices such as school PC&Laptop and my 7 year old laptop

I wasn't able to crash the browser, but I was testing on a 2012 Macbook Air, but I can definitely see how this could crash an older school laptop. I noticed that it created more workers than expected. I saw three copies of hint-worker.js and three copies worker.js. Moving the scrubber should by-pass jshint all together so I would only expect on copy of hint-worker.js for the initial run. I'll need to investigate further using the dev environment to see why that isn't the case as well as to determine what the hot-spots are.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the linked large program in Chrome and Firefox on a low-performance device, then investigate in the dev environment. Start by examining the worker behavior around hint-worker.js and worker.js while moving the scrubber, including why multiple copies are created. Done means the lag and excessive worker creation are addressed without browser crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.