-
Notifications
You must be signed in to change notification settings - Fork 108
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
Server-side course-map rendering (d3.js) #30
Comments
So in terms of steps I'd take if I were implementing this:
|
This wiki entry may be relevant: https://github.com/compserv/hknweb/wiki/Course-Map |
Restructuring the graph itself is out-of-scope for this project; right now tutoring and I are working on that. If you somehow end up finishing this early / are feeling A M B I T I O U S about this, you can ask for more. |
Here is a good link to get started to understand the force layout and physics simulation of d3.js: https://medium.com/@sxywu/understanding-the-force-ef1237017d5 |
Closed by #401 |
Rendering times (excluding loading times) for the current course map are quite long (>5s): https://hkn.eecs.berkeley.edu/courseguides
This is due to the graph being rendered client-side as a d3.js force graph (into an SVG image), which simulates a spring-loaded network graph in time steps until it converges.
This might be mitigated by rendering it once, on the server, caching the resulting SVG (maybe using some hashing system to detect changes?), and sending the SVG as a static asset.
https://mango-is.com/blog/engineering/pre-render-d3-js-charts-at-server-side/
The client-side physics script is at app/assets/javascripts/coursesurveys.js.erb.
The data for the graph is a JSON downloaded from https://hkn.eecs.berkeley.edu/coursesurveys/chartinfo.
The text was updated successfully, but these errors were encountered: