Comments (4)
I wrote a new version of the loader that makes the three changes above. It does seem to save us several hundred milliseconds on the load (and a decent amount of filesize), but a lot of the load time is Javascript execution--presumably writing a few thousand SVG dots is non-trivial and so I'm still not happy with the speed.
I am going to commit the changes but keep the old code around so we can switch or compare.
from webvoteview.
All figures in ms from a pageload after a forced hard cache dump
New Code:
Trial | Stage 1 | Stage 2 | Total |
---|---|---|---|
1 | 88.4 | 11.3 | 99.7 |
2 | 85.8 | 9.68 | 95.5 |
3 | 80.2 | 11.5 | 91.7 |
4 | 85.1 | 13 | 98.1 |
5 | 84.4 | 13.8 | 98.2 |
Old Code:
Trial | Stage 1 | Stage 2 | Total |
---|---|---|---|
1 | 96.4 | 197 | 293.4 |
2 | 88 | 163 | 254 |
3 | 83.6 | 210 | 293.6 |
4 | 99.3 | 202 | 301.3 |
5 | 95.7 | 207 | 302.7 |
The speed improvement for the loading is actually pretty good, so I'm going go ahead and remove the old version.
from webvoteview.
JS load times on the new code:
- Initial file / data load: 85 ms
- process data: 17 ms
- Construct dimensions for crossfilter: 172 ms
- Construct chart for DC: 56 ms
- Render Chart: 196 ms
- Attach tooltips: 48 ms
- Write party list to page: 32 ms
from webvoteview.
The more recent version of DC is a little faster on this and I'm now satisfied with our speed on this page! Would still like rendering and crossfilter to be faster, but I don't think there's much I can do to speed it up.
from webvoteview.
Related Issues (20)
- Fix party page for party 328 (independent) -- JS error [python3 only]
- Add congress codes to metadata
- Brush to select on Congress DW-NOMINATE plot shows NaN when selecting far-right
- Wikipedia key vote not an option on search facets
- Check or update service dates HOT 1
- Rewrite JS in modern-ish (ES6 or newer) Javascript
- Better link previews for rollcall votes
- Party bios should support HTML
- Trump vote on Gorsuch may be wrong
- Map download colors missing HOT 1
- Bulk vote download problem
- More friendly 500 error page
- Downloading zoomed map HOT 1
- Data downloads all 404 HOT 4
- Show member departures
- Add issue codes to csv files
- Scalia confirmation vote
- Load 97th Congress bill numbers
- Two bugs regarding member with DW-NOMINATE score of 0
- Wrong image for 19th-century congressman HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webvoteview.