Meteor-Community-Packages / Meteor-Community-Packages/meteor-timesync

Lower RTT with Meteor.call

Open
#35 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
119
Forks
37
PR merge metrics
No merged PRs in 30d

Description

I find that a simple Meteor.call ping runs with about half the RTT of TimeSync. So to meteor.com, I'm seeing something like 150ms vs 300 for TimeSync. Locally, I see 3ms vs 25ms. I think perhaps the difference is due to the WebSocket on the DDP call. In fact if I disable web sockets locally, I see RTT of 35ms with the Meteor.call vs TimeSync's 25ms. All this was on a non-SSL connection.

Are there perhaps other advantages to the WebApp/HTTP method employed by TimeSync?

```
ping_RTT = new ReactiveVar()
Meteor.setInterval ->
# ping_RTT.set undefined
t1 = Date.now()
Meteor.call 'ping', t1, (e, t)->
t2 = Date.now()
ping_RTT.set t2 - t1
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files, tests, or entry points beyond Meteor.call, TimeSync, and the WebApp/HTTP path. Reproduce the reported RTT comparisons with and without WebSockets, then inspect the relevant implementation paths to establish whether the difference is expected. Done means a documented conclusion or a clearly scoped follow-up change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.