100DoTS Week 5 - Bundler War Story & Web Workers
Hi everyone!
Last week on Chiffre, I worked on some performance improvements to the webapp frontend, using Web Workers to do the heavy lifting off the UI thread, so that the interface can be more fluid and responsive. It’s going well, but there is still a lot to do and I’m sharing this time with freelancing work.
Bundler War Story
I did not send this email yesterday as I was battling a bug on the analytics tracker script: the bundler I use (Parcel) decided to break silently and deployed empty scripts to production! π±
I replaced Parcel with ESBuild, which is still in its infancy but has some amazing performance gains on build times. The time to build the tracker’s 45kB bundle went down from 4.2s to 26ms, that’s 160x faster π€―
The war story continued with CORS issues on the tracker script (causing it not to be loaded at all π), this one is still ongoing for now, although production is now rolled back to a stable state, and I’ll work on this one on a preview subdomain.
Some other improvements that I added to the backlog based on user feedback this week:
- Rework the script embed code to avoid using a JSON block, apparently it can cause some issues with browser reliability and linters. An alternative would be to use attributes on the
<script>
tag, and/or localStorage for dynamic configuration change by the application. - Add a basic Profile page to avoid an error (at the moment clicking on the avatar redirects to a non-existing page).
This week I’ll focus on finishing the Web Worker feature: evaluate strategies (one worker per website vs a single worker that pools fetch requests), measure actual performance gains (using Chrome devtools) and publish the results.
I’m also thinking of moving the analytics processing (what turns the raw events data into insightful leaderboards and bucketed graphs) in a Web Worker, to help analyse large amounts of traffic. There are good performance improvements to gain there, and it will be my main focus once the data fetching story is deployed.
Stats
- π 11 users (+2 since last week)
- π 16 websites (+1 since last week)
- π¦ 38 followers on Twitter (+3 since last week)
- π 25 subscribers on this newsletter (+3 since last week)
- π 15500 events processed (+1845 since last week)
One Last Thing
Chiffre is now featured on the new 100 Days of Tech Startup website, along with some other projects that took on the challenge. Thanks to both Simons for setting that up! π
See you soon, and take care.
François Best
Founder | Chiffre.io