![]() |
Potential Memory Leak when with Ajax
Hi all.
I'm using JavaScript to call a server side service provided by an IBMBPM Tool (Lombardi teamworks), to retrieve an XML object. I've stripped it down to the bare essentials below. When I click on the button, it runs the call 5000 times. Any browser grabs a whole load of memory and never lets go of it. What Am I doing wrong here? The code is below. Code:
<script> |
I apologise for the Thread title also - my brain is obviously malfunctioning this morning and I can't find a way to edit it.
|
Making 5000 XMLHttprequest objects
will never be a good idea.You should make 4 at the start of your code and reuse them, it is not useful to have more that 4 making a requst of the same URL at the same time as most browser are limited to 4 or less connections to the same URL at the same time. |
i see.
I was just using the 5000 calls to test and magnify the memory leak issue. Are you saying I should just call 4 and then loop using these? |
| All times are GMT +1. The time now is 10:55 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.