1

I've noticed that chrome has been slowing down requests a ton when sent rapidly from either the console, or from the same extension.

To test, I experimented by sending a request at a 25 millisecond interval in one extension. Sure enough, the requests slowed down majorly from the starting point at taking about 30-60ms to load, to the point where it would just say 'Pending' and take up to 10 seconds to complete the request. However, when I tried splitting this into two identical chrome extensions, both of which sent requests to the same server, but this time, both had a 50ms interval, the requests were much faster, averaging at around 40-70ms per request.

I'm assuming that chrome is throttling requests sent from either the console or from a single extension, is there any way to disable this? I found the command flag --disable-extensions-http-throttling, but I've had the same issue when using it.

Sam
  • 201
  • 3
  • 11
  • i think its because chrome has a maximum concurrent request hardcoded (to 6 I believe) – Zig Mandel Jul 04 '15 at 16:14
  • @ZigMandel is there anyway to bypass that? Or any more efficient way to send many requests? – Sam Jul 04 '15 at 22:17
  • There's no way to circumvent this. In general, sending less requests is the best way around this, similar to how websites will concatenate and minify css. The specifics are tough to get into without knowing more details. How many requests are you sending? – Brian Jul 05 '15 at 00:22
  • a never-ending loop of 1 request per 15 milliseconds is what I was hoping for, but as I said they end up taking up to like 10 seconds each. It's to keep an API up to date – Sam Jul 05 '15 at 04:48
  • 2
    Once every 15ms? That's ludicrous. Probably what you want to do is send one request, and when it completes send another. Sending off multiple requests a second is just going to create a backlog very quickly. Also consider using web sockets. – AD7six Jul 05 '15 at 05:09

1 Answers1

2

as I commented, you are likely reaching the maximum concurrent requests limit. in Chrome last time I checked it was 6 concurrent requests maximum per domain.

See this other question for more details about concurrent requests:

Max parallel http connections in a browser?

Community
  • 1
  • 1
Zig Mandel
  • 19,571
  • 5
  • 26
  • 36