Jump to content

Offline Sorting by Distance


ciarmer

Recommended Posts

I was out in the field yesterday working with version 2.0.1

The sorting of an offline list by distance seems much improved in this version. However, I still ran across some very odd results occasionally. Once in a while, a class of caches (for example, caches I own) appeared in the sort list incorrectly. Other caches were listed in ascending distance order and then somewhere down the list, a group of caches I own appear (out of order) and they'd be sorted correctly among themselves rather than sorted with the rest of the online caches. Then, after a short period of time, this phenomenon would disappear and they'd be sorted properly with the rest of the group. Seemed strange and hesitate to report it because it seemed sporadic and I can't determine the circumstances under which it happens. It might be that the sorting process gives rise to this and when I look at a list that I think is a final sorted list, I may be looking at a partially sorted list that Cachly is still working on.

Link to comment
Share on other sites

11 hours ago, Nic Hubbard said:

Does this happen if you load a list in one location and then travel to a new location and then try the sorting? Or, does this happen if you are stationary (say, at home) and you load the list and then try to sort by distance?

I just tried this and it appears that is what is happening. Seems if you just stay where you are, the list of caches by distance remains stable based on whether you've selected ascending/descending. It also seems stable if you decide to sort by some other attribute and then go back to distance sorting. But, this morning, I happened to be about 10 miles away from where I was initially and the results by distance using the same offline file seemed almost random.

You can "fix" it so it goes back to a correct sorting by closing down the app and reopening it and then clicking on the offline file you were initially working with. It then reloads the same file (which seems to take a very long time - different issue) and then you get proper sorting with that offline file.

I don't want to complicate this issue by asking about the time it takes to load an offline file - I'll try to frame a reasonable question on that topic for a separate post.

Link to comment
Share on other sites

11 hours ago, ciarmer said:

I just tried this and it appears that is what is happening. Seems if you just stay where you are, the list of caches by distance remains stable based on whether you've selected ascending/descending.

I thought this might be the issue. I have so far been hesitant to fix this without more testing and here is why:

Say you have an offline list with 2000 caches. GPS returns a new location update every second or so. This would be the time to then update all the caches with the new location. However, you could imagine how this could start to turn into an issue if every second we tried to loop through 2000 caches and update their distance. Memory and CPU usage would be high.

To solve this issue I am going to update all caches at a longer interval, say 30 seconds. This should fix the bug while also not overwhelming iOS with trying to update a large amount of caches each second. 

Will work on fixing this bug. Thanks everyone for the testing and input.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...