[webkit-gtk] Memory accumulation with XMLHttpRequest
software at heorot.org
Tue Sep 30 09:15:34 PDT 2014
I'm using v2.2.7 to present a web page that uses XMLHttpRequest to poll for
json formatted status data every 5 seconds. This is on a small embedded
system with 1GB of memory. Originally I used the jQuery getJSON method but
the process consumed all of the available memory in a few days.
I was able reduce the amount of accumulation by using a raw XMLHttpRequest
object and reusing the same object for each request. The requests are
serialized using setTimeout so reuse isn't an problem.
Currently, the memory use levels off after about 120 hours, RSS hovers at
about 100MB. Is there a way for me to lower this peak amount? Is there a
way to force garbage collection?
I'm using setTimeout to serialize the requests. I've verified that the
actual request causes the accumulation, if I use the setTimeout loop
without making the request the memory usage is flat, and if I make the
requests but not touch the response I see the increase in usage.
Any other suggestions? I'd like to try v2.5.4 but my build seems to hang
at a link step with libSVG, 2.2.7 is the most recent version that easily
builds for me. I'm still looking into that.
Outside of a dog, a book is a man's best friend. Inside of a dog, it's too
dark to read. -Groucho Marx
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-gtk