In the past, I have seen some complaints about MCWS being slow (this is why the CSV mode for MCWS SetInfo was added). I have been playing with MCWS from Javascript in a browser, and I am getting
excellent speed except for one caveat.
My test does 116 MCSW SetInfo (simple, not CSV) on 116 different tracks. Elapsed time: 409 ms, which is pretty impressive - close to 300 SetInfo/sec.
The caveat is that almost all the time is spent waiting for the HTTP connection to open: 303 ms for the first reply. If this is removed, we now get over 1000 SetInfo per second.
I suspect the connection opening time was really the core issue making MCWS feel slow.
From a modern browser, the HTTP connections are in keep-alive mode and get reused for many operations, so you pay the startup time only once for many transactions.
I think almost all the earlier examples were Perl-based, and I don't think Perl uses keep-alive connections without some specific work - huge difference when you do lots of small transactions.
If you need to reopen the HTTP connection for every operation, those 116 transactions take almost 40 seconds.
In the same vein, a Current/Files MPL read on the same 116 tracks takes about 54 ms, plus 305 ms of connection setup. For 430 tracks (my entire test library), 68 ms plus setup - excellent.
Pushing it to 10,000 tracks takes 1.5 seconds, roughly 1 second inside MC and 0.5 seconds to transport the 19.6 MB of data. Still excellent.
So I'm real happy with the performance
.
The only intriguing point is the session open time. My suspicion is that MC starts the 52199 web service on-demand only, and shuts it down when all connections are closed (probably to save memory footprint).
So the ~300 ms are the time to start the web server process from scratch (which sounds about reasonable).
Please note that this is
not an improvement request since it's fast enough for my purposes. But it might affect the responsiveness of the various MC remotes like JRemote if they use the same type of mechanism.