Board Thread:Support Requests - Getting Technical/@comment-1504358-20121227231305/@comment-1504358-20121231155907

Pecoes wrote: It's also the fact that throttling can be done in a number of ways. With a simple  command, or at a higher level with cron or the Windows scheduler... etc.
 * Yup, I'm using sleep.

Pecoes wrote: Say, this page may be massive but updating it shouldn't take 130s. It's not the editing of the page that's the problem, is it? It's the aggregation of all that data, right?
 * It's the time taken by the curl_exec method. With a microtime(1) before the call compared to a microtime(1) after the call. I'm not sure exactly if it's the actual time taken to upload the data, as I don't know how curl_exec is coded, but yeah, it's the time that it takes to perform the actual update, not the aggregation, which requires a lot more calls.


 * If you try to compare two previous revisions, you might get a white page, server replies an empty response.

After starting to monitor my web traffic with Fiddler2, it seems to turn out that the white page mentioned before is an Error 503, and the error while using my bot is an error 504. Here's a breakdown of what Fiddler2 said about the big request: ACTUAL PERFORMANCE -- ClientConnected:	10:32:56.285 ClientBeginRequest:	10:32:56.288 GotRequestHeaders:	10:32:56.289 ClientDoneRequest:	10:32:56.307 Determine Gateway:	0ms DNS Lookup: 		11ms TCP/IP Connect:	25ms HTTPS Handshake:	0ms ServerConnected:	10:34:04.913 FiddlerBeginRequest:	10:34:04.913 ServerGotRequest:	10:34:04.914 ServerBeginResponse:	10:34:04.877 GotResponseHeaders:	00:00:00.000 ServerDoneResponse:	10:35:13.508 ClientBeginResponse:	10:35:13.517 ClientDoneResponse:	10:35:13.517

Overall Elapsed:	0:02:17.228

My college network classes are a bit too far away so I can't really know exactly what's going on there, but it seems to me that, yes, sending the data takes a good while, but that's not the only problem there, that the server also has trouble sending back some data. The origin of this issue might be the same as the one when comparing two revisions.

I don't have much time this morning to look further into this, but perhaps the response from the server could be reduced to a simple "success" or "failure with cause" response, which might help reduce the whole request time.

That whole issue is fascinating! :P I'm really looking forward to see what wikia staff has to say about all of this hehe :P

Still, breaking down the request is a good idea ;)


 * EDIT: Updated post formatting.