Closed ScottyB closed 11 years ago
How large is the content you're sending to Emacs from the browser? simple-httpd is currently really slow at receiving data. Emacs gives the network process filter function 4kb at a time. If the response is larger than 4kb these 4kb chunks are appended one at a time, reallocating a new string each time until the size matches the declared Content-Length from the browser. If your completion mode needs to send large chunks of data quickly in order to be reasonably responsive I can try to fix this in simple-httpd. It's just something that hasn't been an issue for me yet.
Skewer does do some request queuing in skewer-queue
. When debugging it's often useful to clear this out.
Each request is a full-round of HTTP. If you need to rapidly make many requests at once I could make skewer smarter and try to handle bulk Skewer requests in a single HTTP request. Tell me if you think this is the problem.
I am only sending small amounts of data so it probably isn't an issue. I suspect it is todo with how the auto-completion library creates a candidate list. I'll let you know if I have any further issues with this.
I found a bug and may have partially fixed your issue in f97a793. I was queuing up POSTs that weren't looking for a response, slowing things down.
While testing the auto-completion, lots of ajax requests are made. This is mostly due to me changing objects and making sure the completion candidates change correctly. Some objects like the document and window object have many candidates where as my defined objects have a lot less.
I noticed that sometimes the browser seems to hang and has to wait to complete all the requests. I still need to investigate this further but I wondered what you think of storing the ajax requests? That would allow me to flush the pending completion requests.
I will provide more information on the issue once I have it. It may be something that needs to be fixed in ac-js2.