• 0

Geolocation & memory leak


Question

hi all new day new problem... ok i THINK the problem i'm having is memory leak but not shore. my script logs user location as they move, if you look at

http://chsites.co.uk/track/www/index.html

Tracking ID = 97

Send at most every (sec) = 5

Minimum Accuracy (meters) = 100000

then open your debug console (i have some notes in there still debugging) you will see that it logs every 5 seconds all good it works BUT after some time it will lock up the browser and eventually crash it

also problem 2 it will post multi times like 3 times at once how can i stop that

so to recap...

problem 1:- browser locking up after some time.

problem 2:-multi posting.

Thanks

Link to comment
https://www.neowin.net/forum/topic/1126760-geolocation-memory-leak/
Share on other sites

5 answers to this question

Recommended Posts

  • 0

For some more information:

https://developer.mozilla.org/en-US/docs/Using_geolocation

I believe using

window.setInterval(StartTracking...)[/CODE]

[size=4][font=arial,helvetica,sans-serif]Is your problem. watchPosition should run it's callback regularly already, but calling watchPostion through setInterval means Firefox will ask for permission each time.[/font][/size]

[size=4]I think, I haven't played with geolocation much.[/size]

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I've not seen any controlled testing and, judging by Microsoft's mentality, within a year, they'll have added so much more bloat, it'll undo any perceptible latency benefit and we'll have boosted the CPU clocks for nothing.
    • It depends: heat soak is a thing. Initially on cold boot-up, the heatsinks & heatpipes are at ambient temp. After heatsinks & heatpipes warm up (through normal usage), they don't immediately cool to ambient temp when the load goes away. So their baseline is higher and the trigger point for fans is much less stress. Add a few more CPU spikes → it's too hot to stay at the same fan RPM → fans get triggered to start up up much sooner / get triggered to ramp much more quickly.
    • Can LibreOffice just shut up and worry about themselves and stop comparing themselves? Do we see Microsoft complaining about euro office?
    • Why should simply opening the Action Center ... require any significant amount of CPU cycles? Too many are ignoring the elephant in the room: today's CPUs may have similar clock frequencies to CPUs from a decade ago (~4 to 5 GHz), but they run with far higher performance per clock, even on the smallest E-cores. The Action Center is a static, minor desktop element. It ought to open instantly on any CPU made in the past 2.5 decades at even low clocks. Opening a program? Boost away. Unzipping a file? Boost to your heart's content. Right-clicking the notification area? This should be an ultra-efficient, low-impact event that opens instantly. Compare today's UI elements to Windows 7 UI elements. Today's UI elements hardly do anything more substantial or important or critical, yet now require modern-day processors to jump half a GHz to reduce their latency.
    • This is not an option lmao: it is part of the KB5094126 update, pushed to all users. There is no GUI to configure it. Reading the article should be required for commenting.
  • Recent Achievements

    • One Year In
      slackerzz earned a badge
      One Year In
    • One Year In
      highriskpaym earned a badge
      One Year In
    • One Month Later
      highriskpaym earned a badge
      One Month Later
    • Week One Done
      highriskpaym earned a badge
      Week One Done
    • Week One Done
      FBSPL earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      501
    2. 2
      PsYcHoKiLLa
      198
    3. 3
      +Edouard
      156
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      71
  • Tell a friend

    Love Neowin? Tell a friend!