2

I found that my prototype with realtime API start work very slow (more than 200-500 milliseconds for collaborative map set operation and this number still grows after 10-20 changes.

You can try oficial Playground https://realtimeplayground.appspot.com with "Edit the demo Collaborative String"

After each changes in the String textarea rtpg.string.field.setText(newValue) starts to run slower and slower from 10 to 300 milliseconds (after 30-40 changes).

What is the performance of realtime API, how it can be increased?

idkras
  • 21
  • 1
  • You shouldn't have to do anything special. It looks like the playground itself has some issues that are slowing things down when you make lots of changes. We are looking into it. – Cheryl Simon Jul 07 '13 at 22:10
  • Yes, i understand, the problem is that my prototype have the same issues. Every time I use set() method for collaborative map the latency grows very fast. After 10-20 updates latency became more than 700ms. Does it mean the problem with google drive or realtime api backend? – idkras Jul 10 '13 at 07:02
  • @idkras The Realtime Playground had a bad inefficiency resizing some UI componants using jQuery. I just pushed a fix. You can try it now and you'll see it's much faster. Though that has nothing to do with the Realtime API. – Nicolas Garnier Jul 10 '13 at 15:53
  • Here is the fix: https://github.com/googledrive/realtime-playground/commit/fcb6efd1fd872678c6e0efeb8e24837772aafe04 – Nicolas Garnier Jul 10 '13 at 15:53
  • If this doesn't fix your issue please let us know! – Nicolas Garnier Jul 10 '13 at 15:54
  • Well @Nivco, I have tested right now. After 300 characters in the Collaborative String text area you can see big lag for every new character. the problem as I see is here. – idkras Jul 10 '13 at 17:36
  • rptg.string.js: rtpg.string.onInput = function(evt) { var newValue = $(rtpg.string.INPUT_SELECTOR).val(); rtpg.string.field.setText(newValue); }; – idkras Jul 10 '13 at 17:39
  • method rtpg.string.field.setText(newValue) works 100ms after 200 symbols in textarea and 150ms after 300 symbols and more than 300ms after 600 symbols in text area and continues to slow down. – idkras Jul 10 '13 at 17:40
  • Hey @idkras I can't reproduce myself on Chrome. I get constant-like short time for this operation even with thousands of characters. Could you give more details such as: are you using another browser? which one? What profiling tool? (so that I could try to replicate). Thanks! – Nicolas Garnier Jul 10 '13 at 23:57

0 Answers0