-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throttle network requests for the same location. #45
Comments
Interesting! I'm guessing you've got The requests you're seeing are requests for activity type ML model data. For them to repeat like that would suggest that either the server isn't returning any models, or it's denied the request (unlikely, because the response code is 200), or there's a bug in that version of LocoKit that allows duplicate/redundant model requests. Either way, the first step I'd recommend is switching to the The Let me know if you see the same problem in that branch. Thanks 😄 |
Yes, I think you're right. Also I downloaded timelines branch but unfortunately I got 2 errors: LocoKitService.fetchModelsFor(coordinate: depthCenter, depth: depth) { json in
if let json = json { self.parseTypes(json: json) } Type 'LocoKitService' has no member 'fetchModelsFor' LocomotionManager LocoKitService.requestWakeup(at: wakeupTime) Type 'LocoKitService' has no member 'requestWakeup' Of course I won't create a new issue for it because you're currently working on this branch😄 |
Hmm. Are you using Arc App in that area? As long as you've confirmed/corrected any activity types at all in that region, there should be model data on the server. The LocoKit coverage page won't necessarily show the model data coordinates for that region, because the data has to pass various privacy thresholds before it can be shown publicly.
That's odd. I built a new LocoKitCore binary just a couple of days ago to fix that exact problem. And confirmed in the Demo App in that that it was working correctly. It's probably worth deleting the |
I just realised this morning that the coverage map is actually a good indicator of what data will be available to LocoKit, because LocoKit has the same privacy restrictions enforced on it. The same privacy thresholds are being applied in both cases. So yeah, if you're not seeing anything on the coverage map for that area, then there won't be any data available to LocoKit either. It would require multiple users training their models to completion, for that region, so that there's no risk of the model data representing only a single person. |
Thank you for explanation. I'll try to test SDK in some another region. |
Yep! And yep!
I submitted an updated Arc App to Apple last night, which is built using that branch of LocoKit. So that'll be going live on the App Store presumably later today. The only thing holding it back from being merged into master is missing documentation. Well, and one ugly bit of API, but the workaround for that ugly API is a one liner, so it's not a major blocker. I'll probably merge it into master next week. I doubt I'll get time to fill in all the missing documentation first though. |
I'm going to close this issue for now, on the assumption that the But @EugeneGoloboyar if you're able to reproduce the problem on that branch, definitely let me know! There's throttling code in there to stop it, but there's always a chance I missed something. Thanks 😄 |
I've played a little with SDK (latest version, master branch).
I'm testing it on my project which has NetworkLogger. (I use it to inspect network request, log specific info)
What I've found strange that my application using SDK executes tones of API requests for the same coordinates. I tried to change my location just by walking at the office.
So I don't have significant location changes, just stationary.
Also I use default accuracy options (30 meters).
It might be better to add some throttling mechanism in order to reduce number of network requests for the same location.
Link for screenshot
iOS version: 11.4.1
Device: iPhone 6+
Xcode: 9.4.1
GPS/Wifi/CoreMotion is Enabled.
The text was updated successfully, but these errors were encountered: