I've looked over the simplenote-electron code and simperium-node code but I've been unable to work out exactly why this is happening. However, most likely source of the bug to me would be the use of setTimeout when handing the version events in collectionRevisions. I am located in Australia and latency from here to the US where I assume Simplenote is hosted is typically 250 to 300ms:
$ ping api.simperium.com
PING simperium.com (192.0.84.247) 56(84) bytes of data.
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=2 ttl=48 time=263 ms
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=3 ttl=48 time=286 ms
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=4 ttl=48 time=307 ms
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=5 ttl=48 time=229 ms
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=6 ttl=48 time=250 ms
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=7 ttl=48 time=273 ms
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=8 ttl=48 time=296 ms
64 bytes from 192.0.84.247 (192.0.84.247): icmp_seq=9 ttl=48 time=319 ms
I suspect that the TIMEOUT of 200ms is set too low for people that are far from the US. To reproduce perhaps try viewing revisions with Chrome's network throttling with additional latency added (E.g. Regular 2G):
Below are screenshots showing the messages on the websocket when clicking the History button on the website. These correspond to the request for revisions but the UI does not reflect them. You can see that most of the requested versions exist on the backend. I.e. they return an entity and not the missing entity response, ?.
@wezm thanks for the debugging. 200ms is definitely too short. revisions-fetching needs some work. we'll try and update it soon; maybe we can eliminate the timeout altogether
Expected
When viewing the revisions of a note with a lot of versions I expect the revisions slider to show quite a few revisions.
Observed
For example I have a note that was created Sat Nov 29 2014 01:29:04 GMT+1100 (Australian Eastern Daylight Time) with many versions.
Reproduced
e
entity request and response messages for all the versions of the noteI've looked over the simplenote-electron code and simperium-node code but I've been unable to work out exactly why this is happening. However, most likely source of the bug to me would be the use of
setTimeout
when handing theversion
events in collectionRevisions. I am located in Australia and latency from here to the US where I assume Simplenote is hosted is typically 250 to 300ms:I suspect that the TIMEOUT of 200ms is set too low for people that are far from the US. To reproduce perhaps try viewing revisions with Chrome's network throttling with additional latency added (E.g. Regular 2G):
Below are screenshots showing the messages on the websocket when clicking the History button on the website. These correspond to the request for revisions but the UI does not reflect them. You can see that most of the requested versions exist on the backend. I.e. they return an entity and not the missing entity response,
?
.