I have been working on improving the performance and scalability of Intervals.icu. One of the low hanging fruits (well sort of, it was a lot of work) is to replace the text JSON messages passed from the server to the client (over WebSockets) with binary messages. I have done this for all the activity data (biggest payloads). The payloads are typically 8x smaller now and performance is noticeably faster.
It still needs some more real world testing before I turn it on for everyone. If you are a supporter please enable it in /settings (at the bottom of the page):
This setting is per device type (desktop, tablet and mobile). If you have any issues please report them here. If you run into something bad you can turn it off again.
Technical details: I am now using Google Protocol Buffers to encode the activity related WebSocket messages instead of JSON. These are compressed with deflate.
Enabled the binary activity protocol, and activities in list view wouldnât load after 30 seconds of waiting. Killed browser tab and opened new tab. Same issue. Disabled and disabled binary activities. Changed from list to calendar view. Enabled binary activities. Opened activities in calendar view and wouldnât load after 30 seconds of waiting. Gave up. MacBook Pro (late 2023) running latest Sonoma 14.6.1.
Was in a meeting at work. About 30 minutes later I opened Brave Browser and it has no problems viewing Calendar. Opened an activity. Copied the url.
Switched to Safari, opened a new tab and pasted the activity URL into Safari. Safari loaded the activity page. Clicked on Activities and the Calendar view wonât open, looks like this:
Tx. Thats annoying. The binary protocol doesnât seem to work on Safari on my Mac either. I did my testing on Chrome mostly. Wasnât expecting latest Safari to have problems with binary messages over WebSockets.
Iâm using Chrome and the overall time taken to have a quick look at activities while switching between many coached athletes is significantly faster.
This makes a big difference.
Thank you @david
Tx everyone. I have fixed the Safari problem and will deploy Thurs AM (GMT+2). When I do that you will need to be running the latest version of the Intervals.icu web app for the binary protocol to work. I have already deployed that so just reload the page at some point to get it.
Loaded 5 year history (Sep 12th 2020 - today) with âBinary Activity Protocolâ selected and again with it deselected. I refreshed activity page between tests so Iâd be starting from same base point.
1159 activities loaded in 5s with âBinary Activity Protocolâ selected and 9s for the same 1159 activities to load with it deselected.
I also added version numbers at the bottom of the /settings page so you can check you are on the latest version. The version is a UTC timestamp of when the app was built and the âCommit Hashâ tells me exactly what was changed in that build.
The app is supposed to update to new versions automatically in the background. Unfortunately this is browser dependent and quite a lot of people are running old versions.
In Chrome it is noticeably faster. Considerable difference. I have not used it in other browsers. I tested it in Edge and it is also much faster. No errors to report.
Safari (iOS) is working, but I havenât checked the speed.
I only use my mobile version to complete my daily wellness and RPE/Feel data, or to manually move a workout (for athletes) when required. Screen is too small for these aging eyes
Thanks. I just fixed that bug. It was unrelated to this protocol stuff but a result of the deep-linking work I did a little while ago.
I have added binary protocol support for events (races, planned workouts etc.). This will help athletes with a lot of non-activity stuff on their calendar.