12 ms·
Video playing is mostly handled by YouTube. Features which use a lot of CPU are tracking learner progress, managing classrooms, and the like. These features ar
by dangoor 7y ago
Video playing is mostly handled by YouTube.
Features which use a lot of CPU are tracking learner progress, managing classrooms, and the like. These features are really important right now as teachers have moved classes online.
We are in the process of moving this code to Go, which should still be very productive for us but also reduce how much CPU is required.
- jambutters 7y agoWhat language is it written in currently? Python? JavaScript?
- dangoor 7y agoCurrently running in Python 2.
- solotronics 7y agoPython3 has pretty good built in modules for asyncio, multiprocessing, and multithreading. Maybe port to py3 and utilize these features as an intermediate step while you are working on the jump to Go. I like to take a function for a single work unit "do a single thing" and then call it from a function utilizing asyncio and multithreading, this link shows a great examples. https://pymotw.com/3/asyncio/executors.html https://pymotw.com/3/asyncio/executors.html
- dangoor 7y agoFor reasons I touch on in our blog post[1], porting to Python 3 would still be a huge amount of work (not quite as large as the port to Go, but still very large and without other benefits we get from Go). [1]: http://engineering.khanacademy.org/posts/goliath.htm http://engineering.khanacademy.org/posts/goliath.htm